/// <summary> /// Opens a new state. Opening procedure is finished by calling SetTransitionInFinished. /// </summary> /// <param name="state">State to be opened.</param> protected virtual void StartState(IAppState state) { _currentState = state; _currentState.EnterFinishedSignal.AddOnce(EnterFinishedHandler); _currentState.ExitFinishedSignal.AddOnce(ExitFinishedHandler); _currentTransition = TransitionType.Enter; state.PerformEnter(); }