示例#1
0
文件: MainMenu.cs 项目: Jimbo92/1915
        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);

        }
示例#2
0
文件: Effects.cs 项目: Jimbo92/1915
        public void LoadContent(ContentManager load_content, string load_texture, float x, float y, int load_rows, int load_columns)
        {
            Texture = load_content.Load<Texture2D>(load_texture);

            position.X = x;
            position.Y = y;
            spriteAnim = new SpriteAnim(Texture, load_rows, load_columns);
        }