public void ClearReload() { BulletLeftInMagazine.SetValue(GetCurrentMagazineCapacity()); ReloadingMagazineTimer?.EndCounting(); BoltReloadCycleTimer?.EndCounting(); IsReloadingMagazine.SetValue(false); IsBoltReloadCycle.SetValue(false); }
public void Shoot() { if (IsReloadingMagazine.Value == false && IsBoltReloadCycle.Value == false) { EjectBullet(); BulletLeftInMagazine.RemoveValue(1); if (BulletLeftInMagazine.Value == 0) { ReloadingMagazineTimer.StartCounting(); IsReloadingMagazine.SetValue(true); } else { BoltReloadCycleTimer.StartCounting(); IsBoltReloadCycle.SetValue(true); } } }