Пример #1
0
        public void UpdateSlowDownStateOnAnyTank(TimeUpdateEvent evt, VulcanWeaponSlowDownNode vulcanSlowDown)
        {
            VulcanWeaponStateComponent component;
            float num = 1f / vulcanSlowDown.vulcanWeapon.SlowDownTime;

            vulcanSlowDown.vulcanWeaponState.State = component.State - (num * evt.DeltaTime);
        }
Пример #2
0
 public void PlayLowEnergyForVulcanSlowDownWeapon(TimeUpdateEvent e, VulcanWeaponSlowDownNode weapon, [JoinByTank] TankNode tank, [JoinAll] SoundListenerNode listener)
 {
     if (InputManager.GetActionKeyDown(ShotActions.SHOT))
     {
         this.PlayLowEnergyFeedback(tank);
     }
 }
Пример #3
0
 public void SlowDown(TimeUpdateEvent e, VulcanWeaponSlowDownNode vulcan, [JoinByTank] SingleNode <AnimationDataComponent> animData, [JoinByTank] HUDNodes.ActiveSelfTankNode tank, [JoinAll] SingleNode <MainHUDComponent> hud)
 {
     hud.component.CurrentEnergyValue = vulcan.vulcanWeaponState.State * animData.component.CooldownScale;
     if (InputManager.GetActionKeyDown(ShotActions.SHOT))
     {
         hud.component.EnergyBlink(false);
     }
 }
Пример #4
0
        public void SlowDown(NodeAddedEvent e, VulcanWeaponSlowDownNode vulcan, [JoinByTank] HUDNodes.ActiveSelfTankNode tank, [JoinAll] SingleNode <MainHUDComponent> hud)
        {
            hud.component.StopEnergyBlink();
            if (vulcan.Entity.HasComponent <AnimationDataComponent>())
            {
                vulcan.Entity.RemoveComponent <AnimationDataComponent>();
            }
            AnimationDataComponent component = new AnimationDataComponent {
                CooldownScale = hud.component.CurrentEnergyValue
            };

            vulcan.Entity.AddComponent(component);
        }