private void CurrentTransition_Finish() { if (CurrentTransition.FadeIn) CurrentTransition = null; else { State = nextState; CurrentTransition = new Transition { Texture = GameGraphics.EmptyTransition, FadeIn = true }; CurrentTransition.Finish += CurrentTransition_Finish; } }
public void StartTransition(GameState newState) { CurrentTransition = new Transition {Texture = GameGraphics.EmptyTransition}; CurrentTransition.Finish += CurrentTransition_Finish; nextState = newState; }