Exemple #1
0
        public Level_1(ContentManager load_Content, Vector2 load_screensize_pos, Rectangle load_screensize_rect, Player load_player, int load_health)
        {
            //misc
            screensize_pos = load_screensize_pos;
            screensize_rect = load_screensize_rect;
            Content = load_Content;
            player = load_player;
            ResetHealth = load_health;


            //HUD
            HeadsUpDisplay = new HUD(load_Content, screensize_pos, screensize_rect);
            HeadsUpDisplay.Health = load_health;

            //Startup
            player.player.sprite_rect.Width = 32;
            player.player.sprite_rect.Height = 27;

            //background
            background.LoadContent(Content, screensize_pos, screensize_rect);
            background.scroll_speed = 1f;
            //setupslides
            background.SlideAdd("graphics/backgrounds/level1/level1_start",
                screensize_pos.Y / 2);
            background.SlideAdd("graphics/backgrounds/level1/level1_1",
                -1050);
            background.SlideAdd("graphics/backgrounds/level1/level1_2",
                -2150);

            //fonts
            LevelTitle = new Fonts(load_Content, screensize_pos.X / 2, screensize_pos.Y / 2 - 200);

        }
Exemple #2
0
        public MainMenu(ContentManager load_Content, Vector2 load_screensize_pos, Rectangle load_screensize_rect, GraphicsDeviceManager load_graphics, Player load_player)
        {
            player = load_player;

            testTex = load_Content.Load<Texture2D>("graphics/gameplay/projectiles/BasicExplosionSS");

            test = new SpriteAnim(testTex, 8, 7);

            //Button load
            //startgame
            StartGameBtn.LoadContentOverlay(load_Content, "graphics/menu/menubutton", "graphics/menu/underline", 256, 64);
            StartGameBtn.ButtonName = "Start Game";
            StartGameBtn.FontSize = 1f;
            StartGameBtn.FontColour = Color.Black;
            //options
            OptionsBtn.LoadContentOverlay(load_Content, "graphics/menu/menubutton", "graphics/menu/underline", 196, 64);
            OptionsBtn.ButtonName = "Options";
            OptionsBtn.FontSize = 1f;
            OptionsBtn.FontColour = Color.Black;
            //quit
            QuitBtn.LoadContentOverlay(load_Content, "graphics/menu/menubutton", "graphics/menu/underline", 128, 64);
            QuitBtn.ButtonName = "Quit";
            QuitBtn.FontSize = 1f;
            QuitBtn.FontColour = Color.Black;

            //options
            //controls
            MouseControlsBtn.LoadContentOverlay(load_Content, "graphics/menu/menubutton", "graphics/menu/underline", 196, 64);
            MouseControlsBtn.ButtonName = "Mouse";
            MouseControlsBtn.FontSize = 1f;
            MouseControlsBtn.FontColour = Color.Black;

            KeyboardControlsBtn.LoadContentOverlay(load_Content, "graphics/menu/menubutton", "graphics/menu/underline", 196, 64);
            KeyboardControlsBtn.ButtonName = "Keyboard";
            KeyboardControlsBtn.FontSize = 1f;
            KeyboardControlsBtn.FontColour = Color.Black;

            BackBtn.LoadContentOverlay(load_Content, "graphics/menu/menubutton", "graphics/menu/underline", 128, 64);
            BackBtn.ButtonName = "Back";
            BackBtn.FontSize = 1f;
            BackBtn.FontColour = Color.Black;


            screensize_pos = load_screensize_pos;
            screensize_rect = load_screensize_rect;
            graphics = load_graphics;

            //menu
            //background
            mBackground.SpriteLoadContent("graphics/menu/background",
                load_Content,
                screensize_pos.X / 2,
                screensize_pos.Y / 2,
                screensize_rect.Width,
                screensize_rect.Height);

            Font_Title = new Fonts(load_Content, screensize_pos.X / 2, screensize_pos.Y / 2 - 270);
            Font_Controls = new Fonts(load_Content, screensize_pos.X / 2, screensize_pos.Y / 2 - 150);

        }
Exemple #3
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            player = new Player(Content, screensize);

            Mmenu = new MainMenu(Content, screensize, screensize_rect, graphics, player);

            level_1 = new Level_1(Content, screensize, screensize_rect, player, UniHealth);

            LevelSelect.LoadContent(Content, screensize, gamemode, player);
        }
Exemple #4
0
        public void Update(ContentManager load_Content, Game1 load_game, Player load_player)
        {
            player = load_player;

            if (EnemyHasWeapon && isAlive)
            {
                BasicEnemyBullet();
            }

            for (int i = 0; i < Bullet_list.Count; i++)
            {
                Bullet_list[i].Update(load_Content, "graphics/gameplay/projectiles/bullet_e", 5, 16);
            }

            if (isAlive && Health != 0)
            {
                Content = load_Content;

                sprite = new Sprite();

                sprite.SpriteLoadContent(Texture, Content, position.X, position.Y, Width, Height);

                sprite.SpriteSetColbox2();

                position += direction * speed;
            }
            else
                if (!isResetRemoved)
                settingScore = true;

            if (settingScore)
            {
                setScore = true;
                scoreTimer++;
            }

            if (scoreTimer >= 2 && settingScore)
            {
                setScore = false;
            }

            if (setScore)
            {
                load_game.UniScore += score;
            }

        }
Exemple #5
0
        public void LoadContent(ContentManager load_content, Vector2 load_screensize, GameMode load_gamemode, Player load_player)
        {
            //Misc
            ScreenSize = load_screensize;
            gameMode = load_gamemode;
            player = load_player;

            //Fonts
            Font_Score = new Fonts(load_content, ScreenSize.X / 2, 100);
            Font_WepUpgrade = new Fonts(load_content, ScreenSize.X / 2, ScreenSize.Y / 2 - 100);
            Font_WepUpgradeLvl = new Fonts(load_content, ScreenSize.X / 2, ScreenSize.Y / 2 - 50);

            Font_CanUpgrade = new Fonts(load_content, ScreenSize.X / 2 - 165, ScreenSize.Y - 100);

            //Buttons
            //Back Button
            BackBtn.LoadContentOverlay(load_content, "graphics/menu/menubutton", "graphics/menu/underline", 128, 64);
            BackBtn.FontSize = 1f;
            BackBtn.FontColour = Color.Black;
            BackBtn.ButtonName = "Back";
            //Level 1 Button
            Lvl1Btn.LoadContentOverlay(load_content, "graphics/menu/menubutton", "graphics/menu/underline", 296, 64);
            Lvl1Btn.FontSize = 1f;
            Lvl1Btn.FontColour = Color.Black;
            Lvl1Btn.ButtonName = "1: First Strike";

            //Upgrades Button
            UpBtn.LoadContentOverlay(load_content, "graphics/menu/menubutton", "graphics/menu/underline", 296, 64);
            UpBtn.FontSize = 1f;
            UpBtn.FontColour = Color.Black;
            UpBtn.ButtonName = "Buy Upgrades";
            //Weapon Upgrade Button
            WepUpBtn.LoadContentOverlay(load_content, "graphics/menu/menubutton", "graphics/menu/underline", 256, 64);
            WepUpBtn.FontSize = 1f;
            WepUpBtn.FontColour = Color.Black;
            WepUpBtn.ButtonName = "Level Up";

        }