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