public LevelElement(string text, Texture2D texture, Vector2 pos, bool selectable, Menu m, MenuAction a, string levelname)
            : base(text, texture, pos, selectable,m, a)
        {
            if (levelname == "alley")
            { unlocked = true; }
            topLeft = pos;
            bottomRight = new Vector2(pos.X + smallWidth, pos.Y + smallHeight);

            topLeftDest = topLeft;
            bottomRightDest = bottomRight;

            world = new World();
            world.Init(levelname);

            vp = new Viewport();
            this.levelname = levelname;
            smallfont = new GFont(TextureManager.smallFont, 5, 10);

            levelThatUnlocks.Add("airport", "alley");
            levelThatUnlocks.Add("jungle", "airport");
            levelThatUnlocks.Add("city", "jungle");
            levelThatUnlocks.Add("powerplant", "city");

            if (levelThatUnlocks.ContainsKey(levelname))
            {
                if (Config.highScore[levelThatUnlocks[levelname]] >= neededScore)
                {
                    unlocked = true;
                }
            }
        }
 public MenuElement(string text, Texture2D texture, Vector2 pos, bool selectable, Menu m, MenuAction a)
 {
     this.text = text;
     this.texture = texture;
     this.pos = pos;
     destination = pos;
     font = new GFont(TextureManager.font, 4, 10);
     this.m = m;
     action = a;
 }
        public static void Init(Game1 game)
        {
            g = game;
            TitleMenu tm = new TitleMenu(game);
            menus.Add("title", tm);
            menus.Add("blank", new BlankMenu(game));
            menus.Add("single-multi", new SingleMultiMenu(game));
            menus.Add("level", new levelMenu(game, false));
            menus.Add("multi", new MultiMenu(game));
            menus.Add("versus", new GametypeVsMenu(game));
            menus.Add("coop", new GametypeCoopMenu(game));
            menus.Add("multi-level", new levelMenu(game, true));
            menus.Add("options", new OptionsMenu(game));

            currentMenu = tm;
        }
        public static void SwitchMenu(Vector2 v, string s)
        {
            if (inputTimer == 0)
            {
                currentMenu = menus[s];
                foreach (KeyValuePair<string, Menu> m in menus)
                {
                    m.Value.ChangePos(v);
                }
                inputTimer = 0.35f;

                SoundEffectInstance swoosh = SoundManager.swoosh.CreateInstance();
                swoosh.Pitch = 0.6f;
                swoosh.Volume = 0.3f;
                swoosh.Play();
            }
        }