public void Draw(ScreenCanvas sc, int x, int y) { foreach (var asteroid in _asteroids) { asteroid.Draw(sc, x, y); } }
public override void Draw(ScreenCanvas sc, int x, int y) { if (_size != AsteroidSize.Dne) { base.Draw(sc, x, y); } }
public void Draw(ScreenCanvas sc, int x, int y) { foreach (var explosion in _explosions) { explosion.Draw(sc, x, y); } }
public override void Draw(ScreenCanvas sc, int x, int y) { for (var i = 0; i < NumExpPoints; i++) { var point = new Point((int)((double)_points[i].X / 10000 * x), (int)((double)_points[i].Y / 7500 * y)); sc.AddLine(point, new Point(point.X + 1, point.Y + 1), GetRandomFireColor()); } }
protected void DrawPolyToScreen(List <Point> alPoly, ScreenCanvas sc, int x, int y, Color penColor) { var pointArray = new Point[alPoly.Count]; for (var i = 0; i < alPoly.Count; i++) { pointArray[i].X = (int)((double)(CurrentLocation.X + alPoly[i].X) / 10000 * x); pointArray[i].Y = (int)((double)(CurrentLocation.Y + alPoly[i].Y) / 7500 * y); } sc.AddPolygon(pointArray, penColor); }
internal void Draw(ScreenCanvas sc, int width, int height) { if (_paused) { if (_iPauseTimer > 30) { sc.AddText("PAUSE", Justify.Center, 2500, 200, 400, width, height); } } Ship.Draw(sc, width, height); foreach (var bullet in _shipBullets) { bullet.Draw(sc, width, height); } AsteroidBelt.Draw(sc, width, height); _explosions.Draw(sc, width, height); //score.Draw(sc, width, height); }
public override void Draw(ScreenCanvas sc, int x, int y) { if (_state != ShipState.Alive) { return; } if (_thrustOn) { var a = PointsTransformed[PointThrust1]; var b = PointsTransformed[PointThrust2]; var num = RndGen.Next(200) + 100; var list = new List <Point>(3) { a, b, new Point((a.X + b.X) / 2 + (int)(num * Math.Sin(Radians)), (a.Y + b.Y) / 2 + (int)(-num * Math.Cos(Radians))) }; DrawPolyToScreen(list, sc, x, y, GetRandomFireColor()); } base.Draw(sc, x, y); }
protected void Draw(ScreenCanvas sc, int x, int y, Color penColor) { DrawPolyToScreen(PointsTransformed, sc, x, y, penColor); }
public virtual void Draw(ScreenCanvas sc, int x, int y) { DrawPolyToScreen(PointsTransformed, sc, x, y, Color.White); }