Example #1
0
 public void changeScreen(Screen newScreen)
 {
     currentScreen.Unload();
     Components.Remove(currentScreen);
     this.currentScreen = newScreen;
     Components.Add(currentScreen);
 }
Example #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);
 }
Example #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();
        }