public void UpdateVulcanShootingOnSelfTank(EarlyUpdateEvent evt, VulcanWeaponShootingControllerNode vulcanShooting, [JoinByTank] SelfActiveTankNode tank) { if (!InputManager.CheckAction(ShotActions.SHOT)) { this.SwitchVulcanFromShootingToSlowDown(vulcanShooting.Entity); } }
public void CheckEnergyInjectionSlot(EarlyUpdateEvent e, StreamWeaponEnergyNode weapon, [JoinByTank] ObservationSlotNode slot, [JoinByModule] SingleNode <EnergyInjectionModuleReloadEnergyComponent> module) { if (this.CheckBlock(weapon.weaponEnergy, module.component, slot.Entity)) { slot.Entity.AddComponentIfAbsent <InventorySlotTemporaryBlockedByClientComponent>(); } }
public void CheckWorkingState(EarlyUpdateEvent evt, ShaftAimingWorkingWeaponControllerNode weapon) { if (!this.CheckHandleWeaponIntersectionStatus(weapon.Entity) && !InputManager.CheckAction(ShotActions.SHOT)) { this.MakeAimingShot(weapon.Entity, weapon.shaftAimingWorkingState.WorkingDirection); } }
public void UpdateVulcanShootingOnSelfTank(EarlyUpdateEvent evt, VulcanWeaponStreamHitShootingControllerNode vulcanShooting, [JoinByTank] SelfActiveTankNode tank) { if (vulcanShooting.cooldownTimer.CooldownTimerSec <= 0f) { base.ScheduleEvent <BeforeShotEvent>(vulcanShooting); base.ScheduleEvent <ShotPrepareEvent>(vulcanShooting); } }
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); } }
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); } }
public void StartStreamWorkingIfPossible(EarlyUpdateEvent evt, StreamWeaponIdleControllerNode idleWeapon, [JoinSelf] SingleNode <ShootableComponent> shootable, [JoinByTank] SelfActiveTankNode selfActiveTank) { Entity weapon = idleWeapon.Entity; if ((idleWeapon.weaponEnergy.Energy > 0f) && InputManager.GetActionKeyDown(ShotActions.SHOT)) { SwitchIdleModeToWorkingMode(weapon); } }
public void UpdateSlowDownStateOnSelfTank(EarlyUpdateEvent evt, VulcanWeaponSlowDownControllerNode vulcanSlowDown, [JoinByTank] SelfActiveTankNode tank) { Entity weapon = vulcanSlowDown.Entity; if (vulcanSlowDown.vulcanWeaponState.State <= 0f) { this.SwitchVulcanFromSlowDownToIdle(weapon); } }
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 StartShotIfPossible(EarlyUpdateEvent evt, SelfTankNode selfTank, [JoinByTank] DiscreteWeaponControllerNode discreteWeaponEnergyController) { CooldownTimerComponent cooldownTimer = discreteWeaponEnergyController.cooldownTimer; if (((discreteWeaponEnergyController.weaponEnergy.Energy >= discreteWeaponEnergyController.discreteWeaponEnergy.UnloadEnergyPerShot) && (cooldownTimer.CooldownTimerSec <= 0f)) && (InputManager.GetAxisOrKey(ShotActions.SHOT) != 0f)) { base.ScheduleEvent <BeforeShotEvent>(discreteWeaponEnergyController); base.ScheduleEvent <ShotPrepareEvent>(discreteWeaponEnergyController); base.ScheduleEvent <PostShotEvent>(discreteWeaponEnergyController); } }
public void UpdateSpeedStateUpOnSelfTank(EarlyUpdateEvent evt, VulcanWeaponSpeedUpControllerNode vulcanSpeedUp, [JoinByTank] SelfActiveTankNode tank) { Entity weapon = vulcanSpeedUp.Entity; if (!InputManager.CheckAction(ShotActions.SHOT)) { this.SwitchVulcanFromSpeedUpToSlowDown(weapon); } else if (vulcanSpeedUp.vulcanWeaponState.State >= 1f) { this.SwitchVulcanFroomSpeedUpToShooting(weapon); } }
public void StartShotIfPossible(EarlyUpdateEvent evt, DiscreteWeaponControllerNode discreteWeaponEnergyController, [JoinByTank] AutopilotTankNode autopilotTank) { float unloadEnergyPerShot = discreteWeaponEnergyController.discreteWeaponEnergy.UnloadEnergyPerShot; float energy = discreteWeaponEnergyController.weaponEnergy.Energy; CooldownTimerComponent cooldownTimer = discreteWeaponEnergyController.cooldownTimer; if ((autopilotTank.autopilotWeaponController.Fire && (energy >= unloadEnergyPerShot)) && (cooldownTimer.CooldownTimerSec <= 0f)) { base.ScheduleEvent <BeforeShotEvent>(discreteWeaponEnergyController); base.ScheduleEvent <ShotPrepareEvent>(discreteWeaponEnergyController); base.ScheduleEvent <PostShotEvent>(discreteWeaponEnergyController); } }
public void CheckEnergyInjectionSlot(EarlyUpdateEvent e, MagazineNode weapon, [JoinByTank] ObservationSlotNode slot, [JoinByModule] SingleNode <EnergyInjectionModuleReloadEnergyComponent> module) { if (this.CheckBlock(weapon.cooldownTimer, slot.Entity)) { if (weapon.magazineStorage.CurrentCartridgeCount < weapon.magazineWeapon.MaxCartridgeCount) { slot.Entity.RemoveComponentIfPresent <InventorySlotTemporaryBlockedByClientComponent>(); } else { slot.Entity.AddComponentIfAbsent <InventorySlotTemporaryBlockedByClientComponent>(); } } }
public void RunWorkingStream(EarlyUpdateEvent evt, StreamWeaponWorkingControllerNode workingWeapon, [JoinByTank] SelfActiveTankNode selfActiveTank) { Entity weapon = workingWeapon.Entity; CooldownTimerComponent cooldownTimer = workingWeapon.cooldownTimer; if (workingWeapon.weaponEnergy.Energy <= 0f) { SwitchWorkingModeToIdleMode(weapon); } else if (InputManager.GetActionKeyUp(ShotActions.SHOT)) { SwitchWorkingModeToIdleMode(weapon); } else if ((cooldownTimer.CooldownTimerSec <= 0f) && workingWeapon.Entity.HasComponent <ShootableComponent>()) { base.ScheduleEvent <BeforeShotEvent>(workingWeapon); base.ScheduleEvent <ShotPrepareEvent>(workingWeapon); } }
public void CheckCameraVisualIntersection(EarlyUpdateEvent evt, TankPartIntersectionWithCameraMapVisibleNode tank, [JoinAll] CameraNode camera) { this.CheckCameraVisualIntersection(tank, camera); }