示例#1
0
 public void changeScreen(Screen newScreen)
 {
     currentScreen.Unload();
     Components.Remove(currentScreen);
     this.currentScreen = newScreen;
     Components.Add(currentScreen);
 }
示例#2
0
 public MenuItem(Game1 game, string text, Vector2 pos, Screen screen)
     : base(game)
 {
     this.game = game;
     this.text = text;
     this.pos = pos;
     this.screen = screen;
     game.Components.Add(this);
 }
示例#3
0
        protected override void Initialize()
        {
            graphics.PreferredBackBufferWidth = 1280;
            graphics.PreferredBackBufferHeight = 800;
            graphics.ApplyChanges();
            currentScreen = new SplashScreen(this);
            cursor = new Cursor(this);
            Components.Add(currentScreen);
            Components.Add(cursor);

            base.Initialize();
        }