Esempio n. 1
0
        public override void LoadContent()
        {
            //Player:
            Content.AddTexture2D("Player\\debug", "Player");
            player = (ObjectPlayer)Objects.AddObject(ObjectPool.ObjectTypes.Player, "Player", "Player");
            player.Position = new Vector2((GraphicsDevice.Viewport.Width / 2) - Convert.ToInt32((player.Texture.Width * player.Scale) / 2), (GraphicsDevice.Viewport.Height / 2) - Convert.ToInt32((player.Texture.Height * player.Scale) / 2));

            //Cursor:
            Content.AddTexture2D("Cursors\\Scope", "Cursor");
            cursor = (ObjectCursor)Objects.AddObject(ObjectPool.ObjectTypes.Cursor, "Cursor", "Cursor");
            cursor.Position = new Vector2(Mouse.GetState().X, Mouse.GetState().Y);

            Content.AddTexture2D("Misc\\Clear\\1x1white", "1x1white");
            Content.AddTexture2D("Misc\\dialog", "debugdialog");

            //Map:
            testmap.LoadContent();
            //Weapons:
            weaponEngine.LoadContent();
            weaponEngine.AddAvailableWeapon(new Glock());
            weaponEngine.AddAvailableWeapon(new USP());

            //Debugging:
            dbvar = new DebugVar("MainFont", Content);
            dbvar.Add(weaponEngine.CurrentWeapon.Name, "Current Weapon");
            dbvar.Add(Content.Count, "Total Content");
            dbvar.Add((Objects.Count + testmap.Objects.Count), "Total Objects");
            dbvar.Add(Mouse.GetState().X, "Mouse X");
            dbvar.Add(Mouse.GetState().Y, "Mouse Y");
            dbvar.Add("", "Clip");
            Achivement = new AchivementEngine();
            Achivement.LoadContent(Objects, Content);

            base.LoadContent();
        }
Esempio n. 2
0
        public override void LoadContent()
        {
            #region Load Buttons
            Content.AddTexture2D("Buttons\\Menu\\NewGame", "Buttons-Menu-NewGame");
            Content.AddTexture2D("Buttons\\Menu\\NewGameSelected", "Buttons-Menu-NewGame_Selected");
            buttonNewGame = (ObjectButton)Objects.AddObject(ObjectPool.ObjectTypes.Button, "Buttons-Menu-NewGame", "Buttons-Menu-NewGame");
            buttonNewGame.X = 50;
            buttonNewGame.Y = 220;
            buttonNewGame.OnClick += new ObjectButton.OnClickDelegate(button_OnClick);

            Content.AddTexture2D("Buttons\\Menu\\Exit", "Buttons-Menu-Exit");
            Content.AddTexture2D("Buttons\\Menu\\ExitSelected", "Buttons-Menu-Exit_Selected");
            buttonExit = (ObjectButton)Objects.AddObject(ObjectPool.ObjectTypes.Button, "Buttons-Menu-Exit", "Buttons-Menu-Exit");
            buttonExit.X = 50;
            buttonExit.Y = 290;
            buttonExit.OnClick += new ObjectButton.OnClickDelegate(button_OnClick);
            #endregion
            //Load Cursor
            Content.AddTexture2D("Cursors\\Basic", "MenuCursor");
            cursor = (ObjectCursor)Objects.AddObject(ObjectPool.ObjectTypes.Cursor, "MenuCursor", "MenuCursor");
            #region Load Menu Backgrounds
            Content.AddTexture2D("Menu\\todesesser_menu_1080p", "menu1080p");
            Content.AddTexture2D("Menu\\todesesser_menu_900p", "menu900p");
            Content.AddTexture2D("Menu\\todesesser_menu_720p", "menu720p");
            Content.AddTexture2D("Menu\\todesesser_menu_800x600", "menu800x600");
            #endregion

            base.LoadContent();
        }
Esempio n. 3
0
        public override void LoadContent()
        {
            //Load Buttons
            Content.AddTexture2D("Buttons\\Menu\\Exit", "Buttons-Pause-Exit");
            Content.AddTexture2D("Buttons\\Menu\\ExitSelected", "Buttons-Pause-Exit_Selected");
            buttonExit = (ObjectButton)Objects.AddObject(ObjectPool.ObjectTypes.Button, "Buttons-Pause-Exit", "Buttons-Pause-Exit");
            buttonExit.X = 50;
            buttonExit.Y = 90;
            buttonExit.OnClick += new ObjectButton.OnClickDelegate(button_OnClick);

            Content.AddTexture2D("Buttons\\Pause\\Resume", "Buttons-Pause-Resume");
            Content.AddTexture2D("Buttons\\Pause\\ResumeSelected", "Buttons-Pause-Resume_Selected");
            buttonResume = (ObjectButton)Objects.AddObject(ObjectPool.ObjectTypes.Button, "Buttons-Pause-Resume", "Buttons-Pause-Resume");
            buttonResume.X = 50;
            buttonResume.Y = 20;
            buttonResume.OnClick += new ObjectButton.OnClickDelegate(button_OnClick);

            //Load Cursor
            Content.AddTexture2D("Cursors\\Basic", "PauseCursor");
            cursor = (ObjectCursor)Objects.AddObject(ObjectPool.ObjectTypes.Cursor, "PauseCursor", "PauseCursor");

            base.LoadContent();
        }