private void SetState(BlowpipeController.State state) { if (this.m_State == state) { return; } this.OnExitState(); this.m_State = state; this.OnEnterState(); }
public override void GetInputActions(ref List <int> actions) { BlowpipeController.State state = this.m_State; if (state == BlowpipeController.State.Idle) { actions.Add(12); return; } if (state != BlowpipeController.State.Aim) { return; } actions.Add(13); }
private void UpdateState() { BlowpipeController.State state = this.m_State; if (state != BlowpipeController.State.Idle) { if (state != BlowpipeController.State.Aim) { if (state != BlowpipeController.State.Shot) { } } else if (!InputsManager.Get().IsActionActive(InputsManager.InputAction.BlowpipeAim)) { this.SetState(BlowpipeController.State.Idle); } } else if (!this.m_Loaded && this.HasArrows()) { this.SetState(BlowpipeController.State.Load); } }