예제 #1
0
        public GraveyardTreasure(float positionX, float positionY, int loadhealth = 100) : base(TextureManager.GetTexture("graveyard_assets", 33, 33, 21), positionX, positionY, 0, 0)
        {
            Health = loadhealth;

            var level = sRandom.Next(2);

            switch (level)
            {
            case 0:
                mHeldGold = 333 * Game1.Difficulty;
                break;

            case 1:
                mHeldAnimals = 2 * Game1.Difficulty;
                break;

            case 2:
                mHeldSeeds = 5 * Game1.Difficulty;
                break;

            default:
                throw new InvalidOperationException("KABOOM");
            }

            for (var i = 0; i < 2 * (Game1.Difficulty + 1); i++)
            {
                var zombie = new TreasureZombie(Position.X, Position.Y, this);
                mWatchers.Add(zombie);
                ObjectManager.Instance.Add(zombie);
            }
        }
예제 #2
0
 public void RemoveZombie(TreasureZombie zombie)
 {
     mWatchers.Remove(zombie);
 }