public void StartShotIfPossible(EarlyUpdateEvent evt, ReadyRailgunChargingWeaponControllerNode chargingWeaponController, [JoinSelf] SingleNode <ShootableComponent> node, [JoinByTank] ActiveTankNode selfActiveTank)
        {
            CooldownTimerComponent cooldownTimer = chargingWeaponController.cooldownTimer;

            if (((chargingWeaponController.weaponEnergy.Energy >= chargingWeaponController.discreteWeaponEnergy.UnloadEnergyPerShot) && (cooldownTimer.CooldownTimerSec <= 0f)) && InputManager.CheckAction(ShotActions.SHOT))
            {
                base.ScheduleEvent <SelfRailgunChargingShotEvent>(chargingWeaponController);
            }
        }
        public void MakeChargingAndScheduleShot(SelfRailgunChargingShotEvent evt, ReadyRailgunChargingWeaponControllerNode chargingWeaponController)
        {
            Entity entity = chargingWeaponController.Entity;

            entity.RemoveComponent <ReadyRailgunChargingWeaponComponent>();
            entity.AddComponent <RailgunChargingStateComponent>();
            EventBuilder builder = base.NewEvent <RailgunDelayedShotPrepareEvent>();

            builder.Attach(chargingWeaponController);
            builder.ScheduleDelayed(chargingWeaponController.railgunChargingWeapon.ChargingTime);
        }