示例#1
0
        public void SetScreen(Screen newScreen, string args)
        {
            if (currentScreen != null)
            {
                currentScreen.Unload();
                currentScreen = null;
            }

            currentScreen = newScreen;
            currentScreen.LoadContent(Content, args);
        }
示例#2
0
        public void SetScreen(Screen newScreen)
        {
            if(currentScreen != null)
            {
                currentScreen.Unload();
                currentScreen = null;
            }

            currentScreen = newScreen;
            currentScreen.LoadContent(Content);
        }