public void AddESMComponent(NodeAddedEvent e, HUDScreenNode hud) { BattleHUDESMComponent component = new BattleHUDESMComponent(); EntityStateMachine esm = component.Esm; esm.AddState <BattleHUDStates.ActionsState>(); esm.AddState <BattleHUDStates.ChatState>(); esm.AddState <BattleHUDStates.ShaftAimingState>(); hud.Entity.AddComponent(component); }
public void AddESMComponent(NodeAddedEvent e, SingleNode <ServiceMessageComponent> node) { ServiceMessageESMComponent component = new ServiceMessageESMComponent(); EntityStateMachine esm = component.Esm; esm.AddState <ServiceMessageStates.ServiceMessageHiddenState>(); esm.AddState <ServiceMessageStates.ServiceMessageVisibleState>(); node.Entity.AddComponent(component); esm.ChangeState <ServiceMessageStates.ServiceMessageHiddenState>(); }
public void InitWeaponEnergyStates(NodeAddedEvent evt, WeaponEnergyNode weapon, [Context, JoinByTank] ActiveTankNode activeTank) { WeaponEnergyESMComponent component = new WeaponEnergyESMComponent(); EntityStateMachine esm = component.Esm; weapon.weaponEnergy.Energy = 1f; esm.AddState <WeaponEnergyStates.WeaponEnergyFullState>(); esm.AddState <WeaponEnergyStates.WeaponEnergyReloadingState>(); esm.AddState <WeaponEnergyStates.WeaponEnergyUnloadingState>(); weapon.Entity.AddComponent(component); }
private void SetupCameraRotationESM(Entity camera) { HangarCameraRotationStateComponent component = new HangarCameraRotationStateComponent(); camera.AddComponent(component); EntityStateMachine esm = component.Esm; esm.AddState <HangarCameraRotationState.Enabled>(); esm.AddState <HangarCameraRotationState.Disabled>(); esm.ChangeState <HangarCameraRotationState.Disabled>(); }
public void InitSoundListenerESM(NodeAddedEvent evt, SoundListenerNode listener) { SoundListenerESMComponent component = new SoundListenerESMComponent(); EntityStateMachine esm = component.Esm; esm.AddState <SoundListenerStates.SoundListenerSpawnState>(); esm.AddState <SoundListenerStates.SoundListenerBattleState>(); esm.AddState <SoundListenerStates.SoundListenerLobbyState>(); esm.AddState <SoundListenerStates.SoundListenerBattleFinishState>(); esm.AddState <SoundListenerStates.SoundListenerSelfRankRewardState>(); listener.Entity.AddComponent(component); }
public void InitESM(NodeAddedEvent e, [Combine] InteractivityPrerequisiteNode prerequisite, [JoinByScreen, Combine, Context] DependentInteractivityNode interactableElement) { if (!prerequisite.Entity.HasComponent <InteractivityPrerequisiteESMComponent>()) { InteractivityPrerequisiteESMComponent component = new InteractivityPrerequisiteESMComponent(); prerequisite.Entity.AddComponent(component); EntityStateMachine esm = component.Esm; esm.AddState <InteractivityPrerequisiteStates.AcceptableState>(); esm.AddState <InteractivityPrerequisiteStates.NotAcceptableState>(); esm.ChangeState <InteractivityPrerequisiteStates.NotAcceptableState>(); } }
private void SetupCameraFlightESM(Entity camera) { HangarCameraFlightStateComponent component = new HangarCameraFlightStateComponent(); camera.AddComponent(component); EntityStateMachine esm = component.Esm; esm.AddState <HangarCameraFlightState.EmptyState>(); esm.AddState <HangarCameraFlightState.ArcFlightState>(); esm.AddState <HangarCameraFlightState.LinearFlightState>(); esm.ChangeState <HangarCameraFlightState.ArcFlightState>(); }
private void SetupCameraViewESM(Entity camera) { HangarCameraViewStateComponent component = new HangarCameraViewStateComponent(); camera.AddComponent(component); EntityStateMachine esm = component.Esm; esm.AddState <HangarCameraViewState.TankViewState>(); esm.AddState <HangarCameraViewState.FlightToLocationState>(); esm.AddState <HangarCameraViewState.LocationViewState>(); esm.AddState <HangarCameraViewState.FlightToTankState>(); esm.ChangeState <HangarCameraViewState.TankViewState>(); }
public void InitESM(NodeAddedEvent e, SingleNode <InputFieldComponent> node) { ESMComponent component = new ESMComponent(); node.Entity.AddComponent(component); EntityStateMachine esm = component.Esm; esm.AddState <InputFieldStates.NormalState>(); esm.AddState <InputFieldStates.InvalidState>(); esm.AddState <InputFieldStates.ValidState>(); esm.AddState <InputFieldStates.AwaitState>(); esm.ChangeState <InputFieldStates.NormalState>(); }
private void SetupCameraESM(Entity cameraEntity) { CameraESMComponent component = new CameraESMComponent(); cameraEntity.AddComponent(component); EntityStateMachine esm = component.Esm; esm.AddState <CameraStates.CameraFollowState>(); esm.AddState <CameraStates.CameraFreeState>(); esm.AddState <CameraStates.CameraGoState>(); esm.AddState <CameraStates.CameraOrbitState>(); esm.AddState <CameraStates.CameraTransitionState>(); }
public void InitShaftShotAnimation(NodeAddedEvent evt, InitialShaftShotAnimationNode weapon) { Animator animator = weapon.animation.Animator; ShaftEnergyComponent shaftEnergy = weapon.shaftEnergy; Entity entity = weapon.Entity; weapon.shaftShotAnimation.Init(animator, weapon.weaponCooldown.CooldownIntervalSec, shaftEnergy.UnloadEnergyPerQuickShot, shaftEnergy.ReloadEnergyPerSec, shaftEnergy.PossibleUnloadEnergyPerAimingShot); weapon.shaftShotAnimationTrigger.Entity = entity; ShaftShotAnimationESMComponent component = new ShaftShotAnimationESMComponent(); entity.AddComponent(component); EntityStateMachine esm = component.Esm; esm.AddState <ShaftShotAnimationStates.ShaftShotAnimationIdleState>(); esm.AddState <ShaftShotAnimationStates.ShaftShotAnimationBounceState>(); esm.AddState <ShaftShotAnimationStates.ShaftShotAnimationCooldownState>(); esm.ChangeState <ShaftShotAnimationStates.ShaftShotAnimationIdleState>(); }
public void InitPlayButton(NodeAddedEvent e, SingleNode <MainScreenComponent> screen, Optional <ButtonNode> pb) { if (!pb.IsPresent()) { Entity entity = base.CreateEntity("PlayButtonEntity"); screen.component.playButton.GetComponent <EntityBehaviour>().BuildEntity(entity); ESMComponent component = new ESMComponent(); entity.AddComponent(component); EntityStateMachine esm = component.Esm; esm.AddState <PlayButtonStates.NormalState>(); esm.AddState <PlayButtonStates.SearchingState>(); esm.AddState <PlayButtonStates.EnteringLobbyState>(); esm.AddState <PlayButtonStates.MatchBeginTimerState>(); esm.AddState <PlayButtonStates.NotEnoughtPlayersState>(); esm.AddState <PlayButtonStates.MatchBeginningState>(); esm.AddState <PlayButtonStates.CustomBattleState>(); esm.AddState <PlayButtonStates.StartCustomBattleState>(); esm.AddState <PlayButtonStates.ReturnToBattleState>(); esm.AddState <PlayButtonStates.EnergyShareScreenState>(); esm.ChangeState <PlayButtonStates.NormalState>(); } }