Esempio n. 1
0
 public void StartShotIfPossible(EarlyUpdateEvent evt, DiscreteWeaponMagazineControllerNode discreteWeaponMagazineController, [JoinByTank] AutopilotTankNode autopilotTank)
 {
     if (autopilotTank.autopilotWeaponController.Fire && (discreteWeaponMagazineController.cooldownTimer.CooldownTimerSec <= 0f))
     {
         base.ScheduleEvent <BeforeShotEvent>(discreteWeaponMagazineController);
         base.ScheduleEvent <ShotPrepareEvent>(discreteWeaponMagazineController);
     }
 }
Esempio n. 2
0
 public void StartShotIfPossible(EarlyUpdateEvent evt, SelfTankNode selfTank, [JoinByTank] DiscreteWeaponMagazineControllerNode discreteWeaponMagazineController)
 {
     if ((discreteWeaponMagazineController.cooldownTimer.CooldownTimerSec <= 0f) && InputManager.CheckAction(ShotActions.SHOT))
     {
         base.ScheduleEvent <BeforeShotEvent>(discreteWeaponMagazineController);
         base.ScheduleEvent <ShotPrepareEvent>(discreteWeaponMagazineController);
     }
 }