Esempio n. 1
0
 public Menu(MenuController menuController, int menuID, int previousMenu)
 {
     MenuController = menuController;
     PreviousMenu = previousMenu;
     MenuID = menuID;
 }
Esempio n. 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            T = new Texture2D(GraphicsDevice, 1, 1);
            T.SetData(new [] { Color.White } );

            //Screen stuff
            graphics.PreferredBackBufferWidth = GeneralSettings.screenWidth;
            graphics.PreferredBackBufferHeight = GeneralSettings.screenHeight;
            graphics.ApplyChanges();

            GameServices.AddService(graphics);
            GameServices.AddService(GraphicsDevice);
            GameServices.AddService(Content);

            players.Add(new Player("Player 1", new Vector2(300, 300), Content.Load<Texture2D>("Textures/player")));
            players.Add(new Player("Player 2", new Vector2(400, 400), Content.Load<Texture2D>("Textures/player")));

            GameServices.AddService(players);

            LevelController = new LevelController();
            LevelController.GoToNextLevel();
            GameServices.AddService(LevelController);

            MenuController = new MenuController();
            ShopCost = 50;

            base.Initialize();
        }
Esempio n. 3
0
 public Menu(MenuController menuController, int menuID, int previousMenu)
 {
     MenuController = menuController;
     PreviousMenu   = previousMenu;
     MenuID         = menuID;
 }