Example #1
0
        public ControlMenu()
        {
            Vector2 size = GameEngine.Instance.GetWindowSize();

            menuView = new MenuView((int)((Math.Min(size.X, size.Y) / 2)), (int)((Math.Min(size.X, size.Y) / 3)), 20);
            GameEngine g = GameEngine.Instance;

            menuView.AddMenuItem(0, "Keyboard Controls", g.GetTexture("keyboardOn"), g.GetTexture("keyboardOff"));
            menuView.AddMenuItem(1, "Xbox Controls", g.GetTexture("xboxOn"), g.GetTexture("xboxOff"));
            menuView.AddMenuItem(-1, "Back", g.GetTexture("mainmenuOn"), g.GetTexture("mainmenuOff"));
            menuView.SetBackground(g.GetTexture("mainbkg"), 4, 3, 15);
        }
Example #2
0
        public WinMenu()
        {
            Vector2 size = GameEngine.Instance.GetWindowSize();

            menuView = new MenuView((int)((Math.Min(size.X, size.Y) / 2)), (int)((Math.Min(size.X, size.Y) / 3)), 20);
            GameEngine g = GameEngine.Instance;

            menuView.AddMenuItem(0, "Congratulations!", null, null);
            menuView.AddMenuItem(1, "You Saved Joey from his kidnappers,", null, null);
            menuView.AddMenuItem(1, "the evil Jelly Aliens", null, null);
            //menuView.SetBackground(g.GetTexture("mainbkg"), 4, 3, 15);
        }
Example #3
0
        public MainMenu()
        {
            float   w      = GameEngine.Instance.GraphicsDevice.ScissorRectangle.Width;
            float   h      = GameEngine.Instance.GraphicsDevice.ScissorRectangle.Height;
            float   scale  = Math.Min(w / 650, h / 650);
            int     shiftw = (int)(w / 2 - Math.Min(w, h) / 2);
            int     shifth = (int)(h / 2 - Math.Min(w, h) / 2);
            Vector2 size   = GameEngine.Instance.GetWindowSize();

            menuView = new MenuView((int)((Math.Min(size.X, size.Y) / 2)), (int)((Math.Min(size.X, size.Y) / 3)), 20);
            GameEngine g = GameEngine.Instance;

            if (GameEngine.Instance.achievement_state.game_progress_exists)
            {
                menuView.AddMenuItem(0, "start", g.GetTexture("continueOn"), g.GetTexture("continueOff"));
            }
            else
            {
                menuView.AddMenuItem(0, "start", g.GetTexture("startOn"), g.GetTexture("startOff"));
            }
            menuView.AddMenuItem(1, "levelselect", g.GetTexture("levelselectOn"), g.GetTexture("levelselectOff"));
            menuView.AddMenuItem(3, "Controls", g.GetTexture("controlsOn"), g.GetTexture("controlsOff"));
            menuView.AddMenuItem(4, "Achievements", g.GetTexture("achievementsOn"), g.GetTexture("achievementsOff"));
            menuView.AddMenuItem(5, "Credits", g.GetTexture("creditsOn"), g.GetTexture("creditsOff"));
            menuView.AddMenuItem(-1, "exit", g.GetTexture("exitOn"), g.GetTexture("exitOff"));
            menuView.SetBackground(g.GetTexture("mainbkg"), 4, 3, 15);
        }
Example #4
0
        public HardMenu()
        {
            Vector2 size = GameEngine.Instance.GetWindowSize();

            menuView = new MenuView((int)(size.X / 2), (int)(size.Y / 3), 10);
            GameEngine g = GameEngine.Instance;

            for (int i = 0; i < GameEngine.level_files.Length; i++)
            {
                string[] s = GameEngine.level_files[i];
                if (s[2].Equals("h"))
                {
                    menuView.AddMenuItem(i, s[1], null, null);
                }
            }
            menuView.AddMenuItem(-1, "Back", null, null);
            menuView.SetBackground(g.GetTexture("mainbkg"), 4, 3, 15);
        }
Example #5
0
        public LevelMenu()
        {
            Vector2 size = GameEngine.Instance.GetWindowSize();

            menuView = new MenuView((int)((Math.Min(size.X, size.Y) / 2)), (int)((Math.Min(size.X, size.Y) / 3)), 20);
            GameEngine g = GameEngine.Instance;

            if (GameEngine.Instance.achievement_state.isWorldUnlocked(1))
            {
                menuView.AddMenuItem(0, "World 1", g.GetTexture("world1On"), g.GetTexture("world1Off"), "Go to Levels of World 1");
            }

            if (GameEngine.Instance.achievement_state.isWorldUnlocked(2))
            {
                menuView.AddMenuItem(1, "World 2", g.GetTexture("world2On"), g.GetTexture("world2Off"), "Go to Levels of World 2");
            }
            else
            {
                menuView.AddMenuItem(1, "World 2", g.GetTexture("world2OnLocked"), g.GetTexture("world2OffLocked"), "World 2 is Locked. Complete at least 6 levels in World 1 to Unlock");
            }

            if (GameEngine.Instance.achievement_state.isWorldUnlocked(3))
            {
                menuView.AddMenuItem(2, "World 3", g.GetTexture("world3On"), g.GetTexture("world3Off"), "Go to Levels of World 3");
            }
            else
            {
                menuView.AddMenuItem(2, "World 3", g.GetTexture("world3OnLocked"), g.GetTexture("world3OffLocked"), "World 3 is Locked. Complete at least 6 levels in World 2 to Unlock");
            }

            if (GameEngine.Instance.achievement_state.isWorldUnlocked(4))
            {
                menuView.AddMenuItem(3, "World 4", g.GetTexture("world4On"), g.GetTexture("world4Off"), "Go to Levels of World 4");
            }
            else
            {
                menuView.AddMenuItem(3, "World 4", g.GetTexture("world4OnLocked"), g.GetTexture("world4OffLocked"), "World 4 is Locked. Complete at least 6 levels in World 3 to Unlock");
            }

            if (GameEngine.Instance.achievement_state.isWorldUnlocked(5))
            {
                menuView.AddMenuItem(4, "World 5", g.GetTexture("world5On"), g.GetTexture("world5Off"), "Go to Levels of World 5");
            }
            else
            {
                menuView.AddMenuItem(4, "World 5", g.GetTexture("world5OnLocked"), g.GetTexture("world5OffLocked"), "World 5 is Locked. Complete at least 6 levels in World 4 to Unlock");
            }

            if (GameEngine.Instance.achievement_state.isWorldUnlocked(6))
            {
                menuView.AddMenuItem(5, "World 6", g.GetTexture("world6On"), g.GetTexture("world6Off"), "Go to Levels of World 6");
            }
            else
            {
                menuView.AddMenuItem(5, "World 6", g.GetTexture("world6OnLocked"), g.GetTexture("world6OffLocked"), "World 6 is Locked. Complete at least 6 levels in World 5 to Unlock");
            }

            if (GameEngine.Instance.achievement_state.isWorldUnlocked(7))
            {
                menuView.AddMenuItem(5, "World 7", g.GetTexture("world7On"), g.GetTexture("world7Off"), "Go to Levels of World 7");
            }
            else
            {
                menuView.AddMenuItem(5, "World 7", g.GetTexture("world7OnLocked"), g.GetTexture("world7OffLocked"), "World 7 is Locked. Complete at least 6 levels in World 6 to Unlock");
            }

            menuView.AddMenuItem(6, "Back", g.GetTexture("mainmenuOn"), g.GetTexture("mainmenuOff"), "Go back to Main Menu");
            menuView.SetBackground(g.GetTexture("mainbkg"), 4, 3, 15);
        }