Exemplo n.º 1
0
 public override void Create()
 {
     field           = new BGField();
     random          = new Random();
     figureXPosition = GetNext(2, 7);
     figureYPosition = -1;
 }
Exemplo n.º 2
0
 public override void Create()
 {
     field        = new BGField();
     player       = new Player(5);
     Arrows       = new List <Arrow>();
     wall         = new Wall();
     PlContMax    = 1;
     WallPrintMax = 8;
     Level        = 1;
 }
Exemplo n.º 3
0
 public void Render(BGField bgField)
 {
     Console.BackgroundColor = ConsoleColor.White;
     if (splashIsPlaying || bgField == null)
     {
         _showSplash();
     }
     else
     {
         _render(bgField);
         _renderStatusPanel();
     }
 }
Exemplo n.º 4
0
 private void _render(BGField bgField)
 {
     for (int i = 0; i < 10; i++)
     {
         for (int j = 0; j < 20; j++)
         {
             if (bgField.GetValueByPosition(i, j) == 0)
             {
                 PrintAtPosition(surfacePositionX + 2 + (i * 2), j + 1, "  ", ConsoleColor.White);
             }
             else
             {
                 PrintAtPosition(surfacePositionX + 2 + (i * 2), j + 1, "▣ ", ConsoleColor.Black);
             }
         }
     }
 }
Exemplo n.º 5
0
 public override void Create()
 {
     field  = new BGField();
     Player = new Tank(5, 5, 1, true);
     Arrows = new List <Arrow>();
     Enemy  = new List <Tank>();
     Enemy.Add(new Tank(6, 18, 1));
     timer        = new System.Diagnostics.Stopwatch();
     AiLoop       = 0;
     AiLoopMax    = 1000;
     AiCreate     = 0;
     AiCreateMax  = 10000;
     ArrowLoop    = 0;
     ArrowLoopMax = 100;
     Level        = 1;
     Score        = 0;
     SetLevel(Level);
     SetScore(Score);
     timer.Start();
 }
Exemplo n.º 6
0
        public override void Create()
        {
            field   = new BGField();
            cars    = new List <int[]>();
            _random = new Random();

            x              = 2;
            speed          = 25;
            score          = 0;
            carsOut        = 0;
            count          = 0;
            playerPosition = 1;

            SetScore(score);
            SetSpeed(speed);

            PrepareBorder(ref leftBorder);
            PrepareBorder(ref rightBorder);
            DrawCar(x, y);
            ClearCar(x == 2 ? 5 : 2, y);
        }
Exemplo n.º 7
0
 public override void Create()
 {
     bgField = new BGField();
     bgField.SetValueAtPosition(x, y, 1);
 }
Exemplo n.º 8
0
 public override void Create()
 {
     field = new BGField();
 }