Beispiel #1
0
        //Gets info from game and menu items.
        //public MainMenu(SpriteFont spriteFont, string[] menuItems)
        public MainMenu(SpriteFont spriteFont)
        {
            this.spriteFont = spriteFont;
            //this.menuItems = menuItems;
            Input.Initialize();
            fontColor = Color.White;
            //MeasureMenu();
            LoadContent();

            logo = new Sprite("logo");
            logo.Scale = 0.4f;
            logo.Position = new Vector2(Stuff.Resolution.X * 0.675f, Stuff.Resolution.Y * 0.3f);

            buttons = new List<Button>();

            //start game
            Button b = new Button("Buttons", new Vector2(150, 50), new Rectangle(0, 120 * 2, 250, 120), false, false);
            buttons.Add(b);
            //high scores
            b = new Button("Buttons", new Vector2(150, 170), new Rectangle(0, 120 * 4, 250, 120), false, false);
            buttons.Add(b);
            //settings
            b = new Button("Buttons", new Vector2(150, 290), new Rectangle(0, 120 * 5, 250, 120), false, false);
            buttons.Add(b);
            //exit game
            b = new Button("Buttons", new Vector2(150, 410), new Rectangle(0, 120 * 7, 250, 120), false, false);
            buttons.Add(b);
            menuEgg = new MenuEgg();
        }
Beispiel #2
0
 public HighScores(ServerHandler serverHandler)
 {
     this.serverHandler = serverHandler;
     btnBack = new Button("Buttons", new Vector2(600, 400), new Rectangle(0, 120 * 6, 250, 120), false, false);
     //btnUpdate = new Button("Buttons", new Vector2(200, 400), new Rectangle(0, 120 * 9, 250, 120), false, false);
     LoadContent();
 }
Beispiel #3
0
 public WeatherMenu(ScreenManager screenManager, Weather weather)
 {
     this.screenManager = screenManager;
     this.weather = weather;
     btnBack = new Button("Buttons", new Vector2(600, 400), new Rectangle(0, 120 * 6, 250, 120), false, false);
     btnSunny = new Button("Buttons", new Vector2(200, 100), new Rectangle(250, 120 * 2, 250, 120), false, false);
     btnCloudy = new Button("Buttons", new Vector2(500, 100), new Rectangle(250, 120 * 3, 250, 120), false, false);
     btnRainy = new Button("Buttons", new Vector2(200, 300), new Rectangle(250, 120 * 4, 250, 120), false, false);
 }
Beispiel #4
0
 public SettingsMenu(Weather weather, ScreenManager screenManager)
 {
     this.weather = weather;
     this.screenManager = screenManager;
     btnBack = new Button("Buttons", new Vector2(600, 400), new Rectangle(0, 120 * 6, 250, 120), false, false);
     btnChangeWeather = new Button("Buttons", new Vector2(200, 200), new Rectangle(250, 120 * 1, 250, 120), false, false);
     btnChangePlayer = new Button("Buttons", new Vector2(200, 400), new Rectangle(250, 120 * 0, 250, 120), false, false);
     LoadContent();
 }
Beispiel #5
0
 public PauseMenu()
 {
     btnBack = new Button("Buttons", new Vector2(200, 400), new Rectangle(0, 120 * 7, 250, 120), false, false);
     btnResume = new Button("Buttons", new Vector2(600, 400), new Rectangle(0, 120 * 3, 250, 120), false, false);
     transparentBackground = new Sprite("pixel");
     transparentBackground.Source = new Rectangle(0, 0, Stuff.Resolution.X, Stuff.Resolution.Y);
     transparentBackground.iColor.SetColor(0, 0, 0, 100);
     transparentBackground.Origin = Vector2.Zero;
     LoadContent();
 }
Beispiel #6
0
 public DeadScreen(ScreenManager screenManager)
 {
     this.screenManager = screenManager;
     btnSendScore = new Button("Buttons", new Vector2(200, 400), new Rectangle(0, 120 * 12, 250, 120), false, false);
     btnRestart = new Button("Buttons", new Vector2(600, 400), new Rectangle(0, 120 * 10, 250, 120), false, false);
     btnChangePlayer = new Button("Buttons", new Vector2(200, 280), new Rectangle(250, 120 * 0, 250, 120), false, false);
     btnExit = new Button("Buttons", new Vector2(600, 280), new Rectangle(0, 120 * 7, 250, 120), false, false);
     this.fontColor = Color.White;
     transparentBackground = new Sprite("pixel");
     transparentBackground.Source = new Rectangle(0, 0, Stuff.Resolution.X, Stuff.Resolution.Y);
     transparentBackground.iColor.SetColor(0, 0, 0, 100);
     transparentBackground.Origin = Vector2.Zero;
     LoadContent();
 }
Beispiel #7
0
        public Player(List<Character> characters)
            : base()
        {
            this.characters = characters;
            sprite = new Sprite("egg");
            sprite.Scale = 0.5f;
            sprite.iColor.SetColor(Color.White);
            speed = 300;
            position = new Vector2(100, 1000);

            btnRight = new Button("UI buttons", new Vector2(250, 420), new Rectangle(0, 300, 150, 150), true, true);
            btnLeft = new Button("UI buttons", new Vector2(90, 420), new Rectangle(0, 150, 150, 150), true, true);
            btnJump = new Button("UI buttons", new Vector2(710, 420), new Rectangle(0, 0, 150, 150), true, true);
            btnPause = new Button("UI buttons", new Vector2(710, 75), new Rectangle(0, 450, 150, 150), true, false);
            btnDebug = new Button("UI buttons", new Vector2(510, 420), new Rectangle(0, 0, 150, 150), true, true);
            btnDebug.sprite.Rotation = 1f;
            weight = 9f;

            LoadContent();
        }