add inter
This commit is contained in:
parent
6670de85b2
commit
cc24f550e0
@ -97,7 +97,7 @@ namespace Airbus
|
|||||||
g.DrawEllipse(new(Color.Black, 2), _startPosX + _airplaneWidth - 30, _startPosY + _airplaneHeight + 25, 4, 4);
|
g.DrawEllipse(new(Color.Black, 2), _startPosX + _airplaneWidth - 30, _startPosY + _airplaneHeight + 25, 4, 4);
|
||||||
g.DrawEllipse(new(Color.Black, 2), _startPosX + _airplaneWidth - 35, _startPosY + _airplaneHeight + 25, 4, 4);
|
g.DrawEllipse(new(Color.Black, 2), _startPosX + _airplaneWidth - 35, _startPosY + _airplaneHeight + 25, 4, 4);
|
||||||
g.DrawEllipse(new(Color.Black, 2), _startPosX , _startPosY + _airplaneHeight + 25, 4, 4);
|
g.DrawEllipse(new(Color.Black, 2), _startPosX , _startPosY + _airplaneHeight + 25, 4, 4);
|
||||||
porthole.DrawPorthole(g, Color.Red, _startPosX, _startPosY);
|
porthole.DrawPortholes(g, Color.Red, _startPosX, _startPosY);
|
||||||
}
|
}
|
||||||
public void Upd_count_Porthole(CountPorthole count)
|
public void Upd_count_Porthole(CountPorthole count)
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Airbus
|
namespace Airbus
|
||||||
{
|
{
|
||||||
internal class DrawningPorthole
|
internal class DrawningPorthole : IPorthole
|
||||||
{
|
{
|
||||||
private CountPorthole _countpornhole;
|
private CountPorthole _countpornhole;
|
||||||
public int CountPorthole
|
public int CountPorthole
|
||||||
@ -18,15 +18,20 @@ namespace Airbus
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void DrawPorthole(Graphics g, Color color, float posX, float posY)
|
public void DrawPortholes(Graphics g, Color color, float posX, float posY)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (int i = 0; i < (int)CountPorthole / 2; i++)
|
for (int i = 0; i < (int)CountPorthole / 2; i++)
|
||||||
{
|
{
|
||||||
g.DrawEllipse(new(color, 2), posX + 125 - i * 7, posY + 30, 5, 5);
|
DrawPorthole(g, color, posX + 125 - i * 7, posY + 30);
|
||||||
g.DrawEllipse(new(color, 2), posX + 125 - i * 7, posY + 40, 5, 5);
|
DrawPorthole(g, color, posX + 125 - i * 7, posY + 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public virtual void DrawPorthole(Graphics g, Color color, float posX, float posY)
|
||||||
|
{
|
||||||
|
g.DrawEllipse(new(color, 2), posX, posY, 5, 5);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
15
Airbus/Airbus/IPorthole.cs
Normal file
15
Airbus/Airbus/IPorthole.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Airbus
|
||||||
|
{
|
||||||
|
internal interface IPorthole
|
||||||
|
{
|
||||||
|
int CountPorthole { get; set; }
|
||||||
|
|
||||||
|
public void DrawPorthole(Graphics g, Color color, float posX, float posY);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user