public void LoadContentBasic(ContentManager load_Content, string load_Texture, int Width, int Height) { sprite.SpriteLoadContent(load_Texture, load_Content, position.X, position.Y, Width, Height); font = new Fonts(load_Content, position.X, position.Y); BtnType = EButtonType.Basic; }
public void LoadContentOverlay(ContentManager load_Content, string load_Texture, string load_Overlay, int Width, int Height) { sprite.SpriteLoadContent(load_Texture, load_Content, position.X, position.Y, Width, Height); overlay.SpriteLoadContent(load_Overlay, load_Content, position.X, position.Y, Width, Height); font = new Fonts(load_Content, position.X, position.Y); BtnType = EButtonType.Overlay; }
public HUD(ContentManager load_content, Vector2 load_screensize_pos, Rectangle load_screensize_rect) { //HUD HUDspr.SpriteLoadContent("graphics/gameplay/ui/gameui", load_content, load_screensize_pos.X / 2, load_screensize_pos.Y / 2, load_screensize_rect.Width, load_screensize_rect.Height); //health gauge HP_Counter.SpriteLoadContent("graphics/gameplay/ui/counter", load_content, 30, load_screensize_pos.Y - 70, 56, 32); //ammo gauge //BAmmo_Gauge.SpriteLoadContent("graphics/gameplay/ui/gauge2", load_content, // 75, load_screensize_pos.Y - 65, 32, 32); //weapon gauge Point_Counter.SpriteLoadContent("graphics/gameplay/ui/counter", load_content, 50, load_screensize_pos.Y - 25, 96, 48); //fonts HP_Font = new Fonts(load_content, HP_Counter.sprite_pos.X, HP_Counter.sprite_pos.Y); Point_Font = new Fonts(load_content, Point_Counter.sprite_pos.X, Point_Counter.sprite_pos.Y); GT_Font = new Fonts(load_content, 100, 50); }
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"; }
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); }
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); }