public void SetState(FSMState state) { CurrentState?.OnExit(); CurrentState = state; CurrentState?.OnEnter(); }