Example #1
0
 public static void Draw()
 {
     Buffer.Graphics.Clear(Color.Black);
     //foreach (BaseObject obj in objs)
     //    obj.Draw();
     foreach (Asteroid a in asteroids)
     {
         a?.Draw();
     }
     heal?.Draw();
     bullet?.Draw();
     ship?.Draw();
     if (ship != null)
     {
         Buffer.Graphics.DrawString("Energy:" + ship.Energy, SystemFonts.DefaultFont, Brushes.White, 0, 0);
     }
     Buffer.Render();
 }
Example #2
0
 /// <summary>
 /// Прорисовка в буфере и вывод на экран
 /// </summary>
 public void Draw()
 {
     Buffer.Graphics.Clear(Color.Black);
     foreach (BaseObject obj in _objs)
     {
         obj.Draw();
     }
     foreach (Asteroid ast in _asteroids)
     {
         ast?.Draw();
     }
     foreach (Bullet b in _bullets)
     {
         b.Draw();
     }
     _ship?.Draw();
     _heal?.Draw();
     if (_ship != null)
     {
         Buffer.Graphics.DrawString("Energy: " + _ship.Energy, SystemFonts.DefaultFont, Brushes.White, 0, 0);
     }
     Buffer.Render();
 }