public SpeedEnemy(Point pos, World w)
     : base(pos, w)
 {
     maxVeloc = 220;
     velocity.X = (int)(-maxVeloc * Config.screenR);
     idealVelocity.X = (int)(-maxVeloc * Config.screenR);
     testAnim = new Animator(TextureManager.zombieSpeedy, 2, 6);
     testAnim.AddAnimation("default", 0, 11, 25, true);
     testAnim.Play("default");
 }
 public FatEnemy(Point pos, World w)
     : base(pos, w)
 {
     health = 3;
     maxVeloc = 40;
     velocity.X = (int)(-maxVeloc * Config.screenR);
     idealVelocity.X = (int)(-maxVeloc * Config.screenR);
     testAnim = new Animator(TextureManager.zombieFat, 2, 6);
     testAnim.AddAnimation("default", 0, 11, 7, true);
     testAnim.Play("default");
 }
        public Enemy(Point pos, World w)
            : base(w)
        {
            this.pos = new Vector2(pos.X, pos.Y);
            rect = new Rectangle(pos.X, pos.Y, width, height);
            hitRect = new Rectangle(rect.X, rect.Y, rect.Width / 2, rect.Height);
            hitOffset = new Point(rect.Width / 4, 0);

            testAnim = new Animator(TextureManager.zombieSheet, 2, 6);
            testAnim.AddAnimation("default", 0, 11, 15, true);
            testAnim.Play("default");
            velocity.X = (int)(-maxVeloc * Config.screenR);
            idealVelocity.X = (int)(-maxVeloc * Config.screenR);
        }
        public BossEnemy(Point pos, World w)
            : base(pos, w)
        {
            health = 6;
            maxVeloc = 75;
            width = (int)(35 * 4 * Config.screenR);
            height = (int)(37 * 4 * Config.screenR);

            velocity.X = (int)(-maxVeloc * Config.screenR);
            idealVelocity.X = (int)(-maxVeloc * Config.screenR);
            testAnim = new Animator(TextureManager.zombieLarge, 2, 6);
            testAnim.AddAnimation("default", 0, 11, 15, true);
            testAnim.Play("default");

            rect = new Rectangle(pos.X, pos.Y, width, height);
            hitRect = new Rectangle(rect.X, rect.Y, rect.Width / 2, rect.Height);
            hitOffset = new Point(rect.Width / 4, 0);
        }
        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 Player(Point pos, World w, int i)
            : base(w)
        {
            alive = false;
            respawnTimer = respawnTime;
            spawnPoint = new Vector2(pos.X, pos.Y);
            this.pos = new Vector2(pos.X, Config.screenH);
            rect = new Rectangle((int)(pos.X * Config.screenR),
                (int)(Config.screenH),
                width,
                height);
            hitRect = new Rectangle(rect.X, rect.Y, rect.Width / 2, rect.Height);
            hitOffset = new Point(rect.Width / 4, 0);
            babyLife = maxBabyLife;

            switch(index){
                case 0:
                    testAnim = new Animator(TextureManager.testRun, 13, 6);
                    break;
                case 1:
                    testAnim = new Animator(TextureManager.santa, 13, 6);
                    break;
                case 2:
                    testAnim = new Animator(TextureManager.bum, 13, 6);
                    break;
                case 3:
                    testAnim = new Animator(TextureManager.pedo, 13, 6);
                    break;
                default:
                    testAnim = new Animator(TextureManager.testRun, 13, 6);
                    break;
            }

            testAnim.AddAnimation("run", 0, 17, 16.5f, true);
            testAnim.AddAnimation("idle", 18, 0, 0, true);
            testAnim.AddAnimation("throw", 19, 0, 0, true);
            testAnim.AddAnimation("jump", 24, 3, 15, true, 26);
            testAnim.AddAnimation("fall", 42, 3, 24, true, 44);
            testAnim.AddAnimation("shoot", 30, 10, 24, true);
            testAnim.AddAnimation("climb", 48, 8, 30, true);
            testAnim.AddAnimation("shake", 60, 17, 200, true);

            testAnim.Play("idle");

            runSound = SoundManager.run.CreateInstance();
            shakeSound = SoundManager.shake.CreateInstance();
            ladderSound = SoundManager.ladder.CreateInstance();

            //test
            if (currentPowerup != null)
            {
                currentPowerup.Activate(this);
            }
            index = i;

            if (MenuSystem.gameType == GameType.vsSurvival ||
                MenuSystem.gameType == GameType.survival ||
                MenuSystem.gameType == GameType.hotPotato)
            {
                lives = 1;
            }

            if (MenuSystem.gameType == GameType.hotPotato ||
                MenuSystem.gameType == GameType.thief)
            {
                if (index != 0) // change to a randomly generated number in menusystem
                {
                    holdingBaby = false;
                    Baby = null;
                    spawnBaby = false;
                }
            }

            if (MenuSystem.gameType == GameType.thief)
            {
                babyLife = maxBabyLife / 2;
            }

            respawnTimer -= 1.4f;
        }