public void InitializeWeapon() { BulletLeftInMagazine.SetValue((int)WeaponInformation.MagazineCapacityCurve.Evaluate(WeaponLevel.Value)); ReloadingMagazineTimer = new Timer(0, GetCurrentReloadingTimeInSeconds(), FinishReloading); BoltReloadCycleTimer = new Timer(0, GetCurrentTimeInSecondBetweenShoots(), FinishBoltCycle); }
public void ClearReload() { BulletLeftInMagazine.SetValue(GetCurrentMagazineCapacity()); ReloadingMagazineTimer?.EndCounting(); BoltReloadCycleTimer?.EndCounting(); IsReloadingMagazine.SetValue(false); IsBoltReloadCycle.SetValue(false); }
private void FinishReloading() { IsReloadingMagazine.SetValue(false); BulletLeftInMagazine.SetValue(GetCurrentMagazineCapacity()); }