public void PushScreen(GameScreen newState)
        {
            currentDrawOrder += INCDRAWORDER;
            newState.DrawOrder = currentDrawOrder;

            AddScreen(newState);

            if (OnScreenChange != null)
                OnScreenChange(this, null);
        }
        public void ChangeScreen(GameScreen newState)
        {
            while (gameScreens.Count > 0)
                RemoveScreen();
            newState.DrawOrder = STARTDRAWORDER;
            currentDrawOrder = STARTDRAWORDER;

            AddScreen(newState);

            if (OnScreenChange != null)
                OnScreenChange(this, null);
        }
 private void AddScreen(GameScreen newState)
 {
     gameScreens.Push(newState);
     Game.Components.Add(newState);
     OnScreenChange += newState.ScreenChange;
 }