public PowerupManager(World w)
 {
     world = w;
     font = new GFont(TextureManager.smallFont, 5, 10);
     width = (int)(TextureManager.pupBackdrop.Width * Config.screenR);
     height = (int)(TextureManager.pupBackdrop.Height * Config.screenR);
 }
        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 SingleMultiMenu(Game1 g)
            : base(g)
        {
            pos = new Vector2(0, Config.screenH * 2);
            backdrop = TextureManager.bPark;
            elements.Add(new MenuElement("single player", null, new Vector2(
                0, Config.screenH / 3), true, this, delegate() { }));
            elements.Add(new MenuElement("multiplayer", null, new Vector2(
                0, (Config.screenH / 3) + (Config.screenH / 6) ), true, this, delegate() { }));

            kite = new Animator(TextureManager.kite, 1, 5);
            kite.AddAnimation("default", 0, 4, 10, true);
            kite.Play("default");

            font = new GFont(TextureManager.font, 4, 10);
            c = Color.White;
            destination = pos;
            elements[0].Selected = true;
        }
 public void SetToDescr()
 {
     descriptionflag = true;
     font = new GFont(TextureManager.smallFont, 5, 10);
 }
 public static void Init(World w)
 {
     newScore = false;
     startTimer = 1.0f;
     initialized = true;
     font = new GFont(TextureManager.font, 4, 10);
     smallfont = new GFont(TextureManager.smallFont, 5, 10);
     position = -Config.screenH;
     rect = new Rectangle(0, -Config.screenH, Config.screenW, Config.screenH);
     world = w;
     world.Automate = false;
     CheckHighScore();
     EvaluateWinner();
 }
        public void Init(string level)
        {
            font = new GFont(TextureManager.font, 4, 10);
            Tutorial.Init(this);
            backdrop.Init(this);
            hud.Init(this);
            coins = new CoinManager(this);
            enemies = new EnemyManager(this);
            powerups = new PowerupManager(this);

            Load(level);
            cam = new Camera();
            cam.Pos = new Vector2(Config.screenW / 2, Config.screenH / 2);
            AddPlayers();
            //players.Add(new Player(spawnPoints[0], this, 0));
        }
 public void Init(World w)
 {
     world = w;
     font = new GFont(TextureManager.font, 4, 10);
 }