Beispiel #1
0
        //A simplified version of spawn method
        public Item SpawnItem()
        {
            int  rand = random.Next(1, 4);
            Item item = null;

            switch (rand)
            {
            case 1:
                item = monsterFactory.CreateArmature();
                break;

            case 2:
                item = monsterFactory.CreatePotion();
                break;

            case 3:
                item = monsterFactory.CreateSword();
                break;
            }
            return(item);
        }