示例#1
0
        static void Main(string[] args)
        {
            Game.InitilizationConsoleByDefault();

            EventOfMap.PrintMap();

            Game.JumpAndFall();


            Block[] blocks = new Block[]
            {
                new Block()
                {
                    X = 75, Width = 4, Heigth = 4
                },
                new Block()
                {
                    X = 55, Width = 4, Heigth = 6
                }
            };

            do
            {
                Game.GameIteration(blocks);

                System.Threading.Thread.Sleep(1000);
            } while (true);
        }
示例#2
0
 public static async Task Fall()
 {
     await Task.Run(
         () =>
     {
         do
         {
             if (ballIsFlight)
             {
                 EventOfMap.FallBall();
             }
         } while (true);
     }
         );
 }
示例#3
0
 public static async Task Jump()
 {
     await Task.Run(
         () =>
     {
         do
         {
             if (Console.ReadKey().Key == ConsoleKey.Spacebar)
             {
                 EventOfMap.JumpPlayer();
             }
         } while (true);
     }
         );
 }