Exemplo n.º 1
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth  = 1280;
            graphics.PreferredBackBufferHeight = 720;
            graphics.ApplyChanges();

            screenWidth      = (int)(graphics.PreferredBackBufferWidth);
            screenHeight     = (int)(graphics.PreferredBackBufferHeight);
            screenGridWidth  = (int)(graphics.PreferredBackBufferWidth / 50) + 1;
            screenGridHeight = (int)(graphics.PreferredBackBufferHeight / 50) + 1;

            player    = new Player(new Vector2(1050, 1100), screenWidth, screenHeight);
            testArea  = new Locations.TestArea(player, screenGridWidth, screenGridHeight, screenWidth, screenHeight, GraphicsDevice);
            slimeCity = new Locations.SlimeCity(player, screenGridWidth, screenGridHeight, screenWidth, screenHeight, GraphicsDevice);
            slimeHut  = new Locations.SlimeHut(player, screenGridWidth, screenGridHeight, screenWidth, screenHeight, GraphicsDevice);
            testArea.AddPortals();
            slimeCity.AddPortals();
            slimeHut.AddPortals();
            player.Travel(slimeCity, new Vector2(1050, 1100));

            menuList = new List <Menu>();

            IsMouseVisible = true;

            playerInfoBar = new PlayerInfoBar(player, screenWidth, screenHeight);



            Content.RootDirectory = "Content";
        }
Exemplo n.º 2
0
 public static void LoadTextures(ContentManager content, GraphicsDevice graphicsDevice)
 {
     swordTexture      = content.Load <Texture2D>("sword");
     projectileTexture = content.Load <Texture2D>("blue-ball");
     megamanTexture    = content.Load <Texture2D>("megaman");
     Inventory.LoadTextures(content);
     Inventory.CreateTextures(graphicsDevice);
     EquipmentMenu.CreateTextures(graphicsDevice);
     PlayerInfoBar.CreateTextures(graphicsDevice);
     PlayerInfoBar.LoadTextures(content);
     InfoBox.CreateTextures(graphicsDevice);
 }