public void AssignFSMToState() { switch (FSM.CurrentState) { case State.IDLE: IdleState.OnAssignFSM(FSM); break; case State.MOVE: MoveState.OnAssignFSM(FSM); break; case State.JUMP: JumpState.OnAssignFSM(FSM); break; case State.DEAD: DeadState.OnAssignFSM(FSM); break; default: throw new System.NotImplementedException($"{FSM.CurrentState} state not implemented."); } }