コード例 #1
0
        public void PushScreen(GameScreen newState)
        {
            currentDrawOrder += INCDRAWORDER;
            newState.DrawOrder = currentDrawOrder;

            AddScreen(newState);

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

            AddScreen(newState);

            if (OnScreenChange != null)
                OnScreenChange(this, null);
        }
コード例 #3
0
 private void AddScreen(GameScreen newState)
 {
     gameScreens.Push(newState);
     Game.Components.Add(newState);
     OnScreenChange += newState.ScreenChange;
 }