Example #1
0
 public void PushState(AeState state)
 {
     _stateManiulationDeferredOperations.Add(() =>
     {
         _states.Add(state);
     });
 }
Example #2
0
 public void ChangeState(AeState state)
 {
     _stateManiulationDeferredOperations.Add(() =>
     {
         _states.Clear();
         _states.Add(state);
     });
 }
Example #3
0
 public void PopState(AeState state)
 {
     _stateManiulationDeferredOperations.Add(() =>
     {
         var indexOfStateToRemove = _states.FindIndex(x => x == state);
         if (indexOfStateToRemove != -1)
         {
             _states.RemoveAt(indexOfStateToRemove);
         }
     });
 }
Example #4
0
 public void ChangeStateWithCurtains(AeState state)
 {
     _stateManiulationDeferredOperations.Add(() =>
     {
         _curtains.FadeOut(() =>
         {
             _stateManiulationDeferredOperations.Add(() =>
             {
                 _states.Clear();
                 _states.Add(state);
                 _curtains.FadeIn();
             });
         });
     });
 }