Exemplo n.º 1
0
        static void createEnemy(GameObjectManager objectManager)
        {
            List <String> zombieTypes = new List <string>()
            {
                "Regular", "Cone", "Bucket", "ScreenDoor"
            };

            for (int x = 0; x < zombieTypes.Count; x++)
            {
                Console.WriteLine((x + 1) + ". " + zombieTypes[x]);
            }

            string input = Console.ReadLine();
            int    res;

            while (!int.TryParse(input, out res))
            {
                Console.WriteLine("That is not a number, try again");
                input = Console.ReadLine();
            }

            objectManager.CreateNewZombie(zombieTypes[res - 1]);
        }