Переименование классов
This commit is contained in:
parent
907be7656b
commit
2d821c9072
@ -1,11 +1,11 @@
|
||||
namespace WarmlyShip
|
||||
{
|
||||
internal class DrawningWarmlyShip
|
||||
internal class DrawningShip
|
||||
{
|
||||
/// <summary>
|
||||
/// Класс-сущность
|
||||
/// </summary>
|
||||
public EntityWarmlyShip Ship { get; private set; }
|
||||
public EntityShip Ship { get; private set; }
|
||||
/// <summary>
|
||||
/// Левая координата отрисовки коробля
|
||||
/// </summary>
|
||||
@ -38,7 +38,7 @@
|
||||
/// <param name="bodyColor">Цвет основной части</param>
|
||||
public void Init(int speed, float weight, Color bodyColor)
|
||||
{
|
||||
Ship = new EntityWarmlyShip();
|
||||
Ship = new EntityShip();
|
||||
Ship.Init(speed, weight, bodyColor);
|
||||
}
|
||||
/// <summary>
|
||||
@ -133,11 +133,11 @@
|
||||
g.FillPolygon(br, P);
|
||||
|
||||
Brush brBlue = new SolidBrush(Color.LightBlue);
|
||||
g.FillRectangle(brBlue, _startPosX + 70, _startPosY + 1, 70, 34);
|
||||
g.FillRectangle(brBlue, _startPosX + 50, _startPosY + 1, 100, 34);
|
||||
|
||||
Pen pen = new(Color.Black);
|
||||
//границы коробля
|
||||
g.DrawRectangle(pen, _startPosX + 70, _startPosY + 1 , 70, 34);
|
||||
g.DrawRectangle(pen, _startPosX + 50, _startPosY + 1 , 100, 34);
|
||||
g.DrawLine(pen, _startPosX, _startPosY + 35, _startPosX + 170, _startPosY + 35);
|
||||
g.DrawLine(pen, _startPosX, _startPosY + 35, _startPosX + 50, _startPosY + 65);
|
||||
g.DrawLine(pen, _startPosX + 50, _startPosY + 65, _startPosX + 150, _startPosY + 65);
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace WarmlyShip
|
||||
{
|
||||
internal class EntityWarmlyShip
|
||||
internal class EntityShip
|
||||
{
|
||||
/// <summary>
|
||||
/// Скорость
|
@ -2,7 +2,7 @@ namespace WarmlyShip
|
||||
{
|
||||
public partial class FormShip : Form
|
||||
{
|
||||
private DrawningWarmlyShip _ship;
|
||||
private DrawningShip _ship;
|
||||
public FormShip()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -22,7 +22,7 @@ namespace WarmlyShip
|
||||
private void buttonCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Random rnd = new();
|
||||
_ship = new DrawningWarmlyShip();
|
||||
_ship = new DrawningShip();
|
||||
_ship.Init(rnd.Next(100, 300), rnd.Next(1000, 2000), Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256)));
|
||||
_ship.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBoxShip.Width, pictureBoxShip.Height);
|
||||
toolStripStatusLabelSpeed.Text = $"Ñêîðîñòü: {_ship.Ship.Speed}";
|
||||
|
7
WarmlyShip/WarmlyShip/Properties/launchSettings.json
Normal file
7
WarmlyShip/WarmlyShip/Properties/launchSettings.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"profiles": {
|
||||
"WarmlyShip": {
|
||||
"commandName": "Project"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user