diff --git a/AirBomber/AirBomber/AirplaneArrowEngines.cs b/AirBomber/AirBomber/AirplaneArrowEngines.cs new file mode 100644 index 0000000..3eba788 --- /dev/null +++ b/AirBomber/AirBomber/AirplaneArrowEngines.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AirBomber +{ + internal class AirplaneArrowEngines : DrawningAirplaneEngines + { + protected override void DrawEngine(Graphics g, Color colorAirplane, RectangleF rectAroundEngine) + { + var x = rectAroundEngine.X + rectAroundEngine.Width / 4; + g.FillPolygon(new SolidBrush(colorAirplane), new PointF[] + { + new PointF(rectAroundEngine.Left, rectAroundEngine.Top + rectAroundEngine.Height / 2), + new PointF(x, rectAroundEngine.Top), + new PointF(x, rectAroundEngine.Bottom), + }); + int margin = 2; + g.FillRectangle(new SolidBrush(colorAirplane), + x , rectAroundEngine.Top + margin, + rectAroundEngine.Right - x, rectAroundEngine.Height - margin * 2); + } + } +} diff --git a/AirBomber/AirBomber/AirplaneRectEngines.cs b/AirBomber/AirBomber/AirplaneRectEngines.cs new file mode 100644 index 0000000..a23dd24 --- /dev/null +++ b/AirBomber/AirBomber/AirplaneRectEngines.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AirBomber +{ + internal class AirplaneRectEngines : DrawningAirplaneEngines + { + protected override void DrawEngine(Graphics g, Color colorAirplane, RectangleF rectAroundEngine) + { + g.FillRectangle(new SolidBrush(colorAirplane), rectAroundEngine); + g.FillRectangle(new SolidBrush(Color.Black), + rectAroundEngine.Left, rectAroundEngine.Top, rectAroundEngine.Width / 4, rectAroundEngine.Height); + } + } +} diff --git a/AirBomber/AirBomber/DrawningAirplaneEngines.cs b/AirBomber/AirBomber/DrawningAirplaneEngines.cs index 2fe3e1b..23d5585 100644 --- a/AirBomber/AirBomber/DrawningAirplaneEngines.cs +++ b/AirBomber/AirBomber/DrawningAirplaneEngines.cs @@ -37,7 +37,7 @@ namespace AirBomber } } - private void DrawEngine(Graphics g, Color colorAirplane, RectangleF rectAroundEngine) + protected virtual void DrawEngine(Graphics g, Color colorAirplane, RectangleF rectAroundEngine) { g.FillEllipse(new SolidBrush(colorAirplane), rectAroundEngine); g.FillEllipse(new SolidBrush(Color.Black),