public override void InitializeStateTransitions() { this.noInputState = new NoInputState(NO_INPUT_STATE, this); this.noInputState.AssignGameCamera(this.gameCamera); this.SetInitialState(this.noInputState); this.dragWorldState = new DragWorldState(DRAG_WORLD_STATE, this); this.dragWorldState.AssignGameCamera(this.gameCamera); this.noInputState.AddTransition(DRAG_WORLD_STATE, this.dragWorldState); this.dragWorldState.AddTransition(NO_INPUT_STATE, this.noInputState); }
public override void InitializeStateTransitions() { this.noInputState = new NoInputState(NO_INPUT_STATE, this); this.noInputState.AssignGameCamera(this.gameCamera); this.SetInitialState(this.noInputState); this.dragWorldState = new DragWorldState(DRAG_WORLD_STATE, this); this.dragWorldState.AssignGameCamera(this.gameCamera); this.noInputState.AddTransition(DRAG_WORLD_STATE, this.dragWorldState); this.dragWorldState.AddTransition(NO_INPUT_STATE, this.noInputState); }
public void Update() { timer += Time.deltaTime; if (timer >= 0.5f) { m_NextState = new NoInputState(m_Character, this); } if (m_LastState is BackState) { m_NextState = new NoInputState(m_Character, this); if (m_Character.m_CurrentState is BaseBattleState) { m_Character.m_CurrentState = new BattleStepBack(m_Character); } } }
public void Update() { timer += Time.deltaTime; if (timer >= 0.5f) { m_NextState = new NoInputState(m_Character, this); } if (m_LastState is ForwardState) { m_NextState = new NoInputState(m_Character, this); if (m_Character.m_CurrentState is BaseBattleState) { if (m_Character.m_EnemyHitInfo.collider != null) { m_Character.m_CurrentState.m_NextState = new BattleDashThrough(m_Character); } else { m_Character.m_CurrentState.m_NextState = new BattleDash(m_Character); } } } }