/** Manage the ring's state update * Handling the "Input state changers" before the "Update state changers" */ public void Update() { StateBase state = _move.Update(_ring); if (state != null) { ChangeMoveState((MoveState)state); } }
// Update is called once per frame void Update() { switch (FSM.CurrentState) { case State.IDLE: IdleState.Update(); break; case State.MOVE: MoveState.Update(); break; case State.JUMP: JumpState.Update(); break; case State.DEAD: DeadState.Update(); break; default: throw new System.NotImplementedException($"{FSM.CurrentState} state not implemented."); } }