public SelectScreen2(int width, int height, IScreenMaster master) : base(width, height, master) { input = Settings.in2; Texture2D up = Load<Texture2D>("Image/buttonUp"); Texture2D down = Load<Texture2D>("Image/buttonDown"); SpriteFont font = Load<SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; ColorRect c = new ColorRect(0, 0, widthScreen, heightScreen, Color.Black); bg = c; Label t = new Label(widthScreen / 2, 10, font, "P2, Select Character"); t.x -= (int)t.GetDim().X / 2; title = t; Button back = new TextButton(centerX, heightScreen - up.Height - 10, up, down, font, "Back"); back.select += delegate() { ChangeScreen<SelectScreen1>(); }; CharacterButton wasp = new CharacterButton(100, 100, LoadAnim("waspIdle"), up, down); wasp.select += delegate() { Settings.P2_FIGHTER = "wasp"; ChangeScreen<GameScreen>(); }; buttons.Add(wasp); CharacterButton beetle = new CharacterButton(180, 100, LoadAnim("beetleIdle"), up, down); beetle.select += delegate() { Settings.P2_FIGHTER = "beetle"; ChangeScreen<GameScreen>(); }; buttons.Add(beetle); buttons.Add(back); }
public MainMenuScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { Texture2D up = Load <Texture2D>("Image/buttonUp"); Texture2D down = Load <Texture2D>("Image/buttonDown"); SpriteFont font = Load <SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; int buttonStartY = heightScreen / 3; int buttonSpacing = 10; ColorRect c = new ColorRect(0, 0, widthScreen, heightScreen, Color.Black); bg = c; Label t = new Label(widthScreen / 2, 10, font, "Project: Height"); t.x -= (int)t.GetDim().X / 2; title = t; Button newGame = new TextButton(centerX, buttonStartY, up, down, font, "New Game"); Button loadGame = new TextButton(centerX, buttonStartY + up.Height + buttonSpacing, up, down, font, "Load Game"); Button options = new TextButton(centerX, buttonStartY + 2 * (up.Height + buttonSpacing), up, down, font, "Options"); newGame.select += delegate() { LevelLoader.Load(1); ChangeScreen <StoryScreen>(); }; loadGame.select += delegate() { ChangeScreen <LoadGameScreen>(); }; options.select += delegate() { ChangeScreen <OptionScreen>(); }; buttons.Add(newGame); buttons.Add(loadGame); buttons.Add(options); }
public InGameScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { LevelLoader load = LevelLoader.GetCurrentLoader(); lvl = load.CreateLevel(this); }
public MainMenuScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { Texture2D up = Load<Texture2D>("Image/buttonUp"); Texture2D down = Load<Texture2D>("Image/buttonDown"); SpriteFont font = Load<SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; int buttonStartY = heightScreen / 3; int buttonSpacing = 10; ColorRect c = new ColorRect(0, 0, widthScreen, heightScreen, Color.Black); bg = c; Label t = new Label(widthScreen / 2, 10, font, "Project: Height"); t.x -= (int)t.GetDim().X / 2; title = t; Button newGame = new TextButton(centerX, buttonStartY, up, down, font, "New Game"); Button loadGame = new TextButton(centerX, buttonStartY + up.Height + buttonSpacing, up, down, font, "Load Game"); Button options = new TextButton(centerX, buttonStartY + 2 * (up.Height + buttonSpacing), up, down, font, "Options"); newGame.select += delegate() { LevelLoader.Load(1); ChangeScreen<StoryScreen>(); }; loadGame.select += delegate() { ChangeScreen<LoadGameScreen>(); }; options.select += delegate() { ChangeScreen<OptionScreen>(); }; buttons.Add(newGame); buttons.Add(loadGame); buttons.Add(options); }
public MenuScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { buttons = new List <Button>(); current = -1; buttonPressed = false; timeout = 0; hovering = false; hovering = true; }
public MenuScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { buttons = new List<Button>(); current = -1; buttonPressed = false; timeout = 0; hovering = false; hovering = true; }
public PreGameScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { LevelLoader lvl = LevelLoader.GetCurrentLoader(); Texture2D up = Load <Texture2D>("Image/buttonUp"); Texture2D down = Load <Texture2D>("Image/buttonDown"); SpriteFont font = Load <SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; int centerY = heightScreen / 2 - up.Height / 2; cont = new TextButton(centerX, centerY, up, down, font, "Continue to InGame (Level " + lvl.GetId() + ")"); cont.select += delegate() { ChangeScreen <InGameScreen>(); }; }
public PreGameScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { LevelLoader lvl = LevelLoader.GetCurrentLoader(); Texture2D up = Load<Texture2D>("Image/buttonUp"); Texture2D down = Load<Texture2D>("Image/buttonDown"); SpriteFont font = Load<SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; int centerY = heightScreen / 2 - up.Height / 2; cont = new TextButton(centerX, centerY, up, down, font, "Continue to InGame (Level " + lvl.GetId() + ")"); cont.select += delegate() { ChangeScreen<InGameScreen>(); }; }
public GameScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { Audio.GetInstance().PlaySong(Load <SoundEffect>("Audio/battle")); p = new Physics(); bg = new Background(Load <Texture2D>("Image/stage")); var pos1 = new Vector2(50, 150); var pos2 = new Vector2(440, 150); p1 = GetFighter(pos1, Load <Texture2D>("Image/p1"), Settings.in1, false, Settings.P1_FIGHTER); p2 = GetFighter(pos2, Load <Texture2D>("Image/p2"), Settings.in2, true, Settings.P2_FIGHTER); h1 = new HealthBar(p1, Load <Texture2D>("Image/blue"), false, new Vector2(10, 10)); h2 = new HealthBar(p2, Load <Texture2D>("Image/red"), true, new Vector2(widthScreen - 110, 10)); w1 = new Wall(new Rectangle(-30, -1000, 30, 1000 + heightScreen)); w2 = new Wall(new Rectangle(widthScreen, -1000, 30, 1000 + heightScreen)); }
public MainMenuScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { Audio.GetInstance().PlaySong(Load <SoundEffect>("Audio/Menu")); /* * SoundEffectInstance soundEffectInstance = song.CreateInstance(); * soundEffectInstance.IsLooped = true; * soundEffectInstance.Play(); */ Settings.in1 = new FighterInput(PlayerIndex.One); Settings.in2 = new FighterInput(PlayerIndex.Two); input = Settings.in1; Texture2D up = Load <Texture2D>("Image/buttonUp"); Texture2D down = Load <Texture2D>("Image/buttonDown"); SpriteFont font = Load <SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; int buttonStartY = heightScreen / 3; int buttonSpacing = 10; bg = new Image(0, 0, Load <Texture2D>("Image/mainBg")); Label t = new Label(widthScreen / 2, 10, font, ""); t.x -= (int)t.GetDim().X / 2; title = t; Button newGame = new TextButton(300, 100, up, down, font, "Play?"); //Button loadGame = new TextButton(centerX, buttonStartY + up.Height + buttonSpacing, up, down, font, "Load Game"); //Button options = new TextButton(centerX, buttonStartY + 2 * (up.Height + buttonSpacing), up, down, font, "Options"); newGame.select += delegate() { ChangeScreen <SelectScreen1>(); }; //loadGame.select += delegate() { soundEffectInstance.Stop(); ChangeScreen<LoadGameScreen>(); }; //options.select += delegate() { soundEffectInstance.Stop(); ChangeScreen<OptionScreen>(); }; buttons.Add(newGame); //buttons.Add(loadGame); //buttons.Add(options); }
public GameScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { Audio.GetInstance().PlaySong(Load<SoundEffect>("Audio/battle")); p = new Physics(); bg = new Background(Load<Texture2D>("Image/stage")); var pos1 = new Vector2(50, 150); var pos2 = new Vector2(440, 150); p1 = GetFighter(pos1, Load<Texture2D>("Image/p1"), Settings.in1, false, Settings.P1_FIGHTER); p2 = GetFighter(pos2, Load<Texture2D>("Image/p2"), Settings.in2, true, Settings.P2_FIGHTER); h1 = new HealthBar(p1, Load<Texture2D>("Image/blue"), false, new Vector2(10, 10)); h2 = new HealthBar(p2, Load<Texture2D>("Image/red"), true, new Vector2(widthScreen - 110, 10)); w1 = new Wall(new Rectangle(-30,-1000,30,1000+heightScreen)); w2 = new Wall(new Rectangle(widthScreen, -1000, 30, 1000+heightScreen)); }
public LoadGameScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { Texture2D up = Load<Texture2D>("Image/buttonUp"); Texture2D down = Load<Texture2D>("Image/buttonDown"); SpriteFont font = Load<SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; ColorRect c = new ColorRect(0, 0, widthScreen, heightScreen, Color.Black); bg = c; Label t = new Label(widthScreen / 2, 10, font, "Load Game"); t.x -= (int)t.GetDim().X / 2; title = t; Button back = new TextButton(centerX, heightScreen - up.Height - 10, up, down, font, "Back"); back.select += delegate() { ChangeScreen<MainMenuScreen>(); }; buttons.Add(back); }
public MainMenuScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { Audio.GetInstance().PlaySong(Load<SoundEffect>("Audio/Menu")); /* SoundEffectInstance soundEffectInstance = song.CreateInstance(); soundEffectInstance.IsLooped = true; soundEffectInstance.Play(); */ Settings.in1 = new FighterInput(PlayerIndex.One); Settings.in2 = new FighterInput(PlayerIndex.Two); input = Settings.in1; Texture2D up = Load<Texture2D>("Image/buttonUp"); Texture2D down = Load<Texture2D>("Image/buttonDown"); SpriteFont font = Load<SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; int buttonStartY = heightScreen / 3; int buttonSpacing = 10; bg = new Image(0, 0, Load<Texture2D>("Image/mainBg")); Label t = new Label(widthScreen / 2, 10, font, ""); t.x -= (int)t.GetDim().X / 2; title = t; Button newGame = new TextButton(300, 100, up, down, font, "Play?"); //Button loadGame = new TextButton(centerX, buttonStartY + up.Height + buttonSpacing, up, down, font, "Load Game"); //Button options = new TextButton(centerX, buttonStartY + 2 * (up.Height + buttonSpacing), up, down, font, "Options"); newGame.select += delegate() { ChangeScreen<SelectScreen1>(); }; //loadGame.select += delegate() { soundEffectInstance.Stop(); ChangeScreen<LoadGameScreen>(); }; //options.select += delegate() { soundEffectInstance.Stop(); ChangeScreen<OptionScreen>(); }; buttons.Add(newGame); //buttons.Add(loadGame); //buttons.Add(options); }
public LoadGameScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { Texture2D up = Load <Texture2D>("Image/buttonUp"); Texture2D down = Load <Texture2D>("Image/buttonDown"); SpriteFont font = Load <SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; ColorRect c = new ColorRect(0, 0, widthScreen, heightScreen, Color.Black); bg = c; Label t = new Label(widthScreen / 2, 10, font, "Load Game"); t.x -= (int)t.GetDim().X / 2; title = t; Button back = new TextButton(centerX, heightScreen - up.Height - 10, up, down, font, "Back"); back.select += delegate() { ChangeScreen <MainMenuScreen>(); }; buttons.Add(back); }
public SelectScreen2(int width, int height, IScreenMaster master) : base(width, height, master) { input = Settings.in2; Texture2D up = Load <Texture2D>("Image/buttonUp"); Texture2D down = Load <Texture2D>("Image/buttonDown"); SpriteFont font = Load <SpriteFont>("Font/text"); int centerX = widthScreen / 2 - up.Width / 2; ColorRect c = new ColorRect(0, 0, widthScreen, heightScreen, Color.Black); bg = c; Label t = new Label(widthScreen / 2, 10, font, "P2, Select Character"); t.x -= (int)t.GetDim().X / 2; title = t; Button back = new TextButton(centerX, heightScreen - up.Height - 10, up, down, font, "Back"); back.select += delegate() { ChangeScreen <SelectScreen1>(); }; CharacterButton wasp = new CharacterButton(100, 100, LoadAnim("waspIdle"), up, down); wasp.select += delegate() { Settings.P2_FIGHTER = "wasp"; ChangeScreen <GameScreen>(); }; buttons.Add(wasp); CharacterButton beetle = new CharacterButton(180, 100, LoadAnim("beetleIdle"), up, down); beetle.select += delegate() { Settings.P2_FIGHTER = "beetle"; ChangeScreen <GameScreen>(); }; buttons.Add(beetle); buttons.Add(back); }
public MenuScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { buttons = new List <Button>(); }
public MenuScreen(int widthScreen, int heightScreen, IScreenMaster master) : base(widthScreen, heightScreen, master) { buttons = new List<Button>(); }
public Screen(int widthScreen_, int heightScreen_, IScreenMaster c_) { widthScreen = widthScreen_; heightScreen = heightScreen_; c = c_; }