public static void Draw() { __buffer.Graphics.DrawImage(__background, 0, 0, Width, Height); foreach (BaseObject obj in __objs.Where(x => x.Enabled)) { obj.Draw(); } foreach (Asteroid ast in __asteroids.Where(x => x.Enabled)) { ast.Draw(); } foreach (Bullet bullet in __bullets.Where(x => x.Enabled)) { bullet.Draw(); } if (__ship.Enabled) { __ship.Draw(); } if (__repair.Enabled) { __repair.Draw(); } MainForm mf = Application.OpenForms[0] as MainForm; __buffer.Graphics.DrawString($"Пилот: {mf.Nik()}", new Font(FontFamily.GenericSansSerif, 15, FontStyle.Bold), Brushes.Orange, 0, 0); // SystemFonts.DefaultFont, Brushes.Orange, 0, 0); __buffer.Render(); }