Ejemplo n.º 1
0
        private void OnStateFinished(EState finishedState)
        {
            if (CurrentState != finishedState)
            {
                throw new InvalidOperationException("OnStateFinished called for something else than the current state, fix your logic.");
            }

            if (!TrySetToNextPendingStates())
            {
                StateFinished?.Invoke(finishedState);
            }
        }
Ejemplo n.º 2
0
 protected void FinishState()
 {
     StateFinished?.Invoke(GetName());
 }