示例#1
0
    public void InitializeWeapon()
    {
        BulletLeftInMagazine.SetValue((int)WeaponInformation.MagazineCapacityCurve.Evaluate(WeaponLevel.Value));

        ReloadingMagazineTimer = new Timer(0, GetCurrentReloadingTimeInSeconds(), FinishReloading);
        BoltReloadCycleTimer   = new Timer(0, GetCurrentTimeInSecondBetweenShoots(), FinishBoltCycle);
    }
示例#2
0
    public void ClearReload()
    {
        BulletLeftInMagazine.SetValue(GetCurrentMagazineCapacity());

        ReloadingMagazineTimer?.EndCounting();
        BoltReloadCycleTimer?.EndCounting();

        IsReloadingMagazine.SetValue(false);
        IsBoltReloadCycle.SetValue(false);
    }
示例#3
0
 private void FinishReloading()
 {
     IsReloadingMagazine.SetValue(false);
     BulletLeftInMagazine.SetValue(GetCurrentMagazineCapacity());
 }