public void Reload(TimeUpdateEvent e, HammerEnergyNode weapon, [JoinByTank] HUDNodes.ActiveSelfTankNode tank, [JoinAll] SingleNode <MainHUDComponent> hud)
 {
     if (((weapon.cooldownTimer.CooldownTimerSec > 0f) || (weapon.Entity.HasComponent <MagazineReloadStateComponent>() || !weapon.Entity.HasComponent <ShootableComponent>())) && InputManager.GetActionKeyDown(ShotActions.SHOT))
     {
         hud.component.EnergyBlink(false);
     }
 }
Exemple #2
0
 public void PlayLowEnergyForHammerWeapon(TimeUpdateEvent e, HammerEnergyNode weapon, [JoinByTank] TankNode tank, [JoinAll] SoundListenerNode listener)
 {
     if (InputManager.GetActionKeyDown(ShotActions.SHOT) && ((weapon.cooldownTimer.CooldownTimerSec > 0f) || (weapon.Entity.HasComponent <MagazineReloadStateComponent>() || !weapon.Entity.HasComponent <ShootableComponent>())))
     {
         this.PlayLowEnergyFeedback(tank);
     }
 }
 public void Init(NodeAddedEvent e, HammerEnergyNode weapon, [JoinByTank, Context] HUDNodes.SelfTankNode tank, SingleNode <MainHUDComponent> hud)
 {
     hud.component.EnergyBarEnabled       = true;
     hud.component.MaxEnergyValue         = weapon.magazineWeapon.MaxCartridgeCount;
     hud.component.EnergyAmountPerSegment = 1f;
     hud.component.CurrentEnergyValue     = 0f;
 }