Esempio n. 1
0
        static void UFOSpawnerTest()
        {
            TestGame game = new TestGame(new ConsoleDrawer(10, 10));

            game.Start();

            var ufoSpawner = game.CreateOnScene <CooldownSpawner <UFO> >(new Vector2(0, 3));

            ufoSpawner.SpawnCooldown = 5;

            game.Update();
            game.Update();

            System.Console.WriteLine(game.GetFromScene <Transform>().Count == 2);

            game.Update();
            game.Update();
            game.Update();
            game.Update();
            game.Update();

            System.Console.WriteLine(game.GetFromScene <Transform>().Count == 3);
            // System.Console.WriteLine(game.Score == 0);
        }