зафиксировать

This commit is contained in:
Kristina 2023-12-25 00:13:20 +04:00
parent 126cd2332b
commit 6295e00999
2 changed files with 3 additions and 13 deletions

View File

@ -17,9 +17,7 @@ namespace Boat_Hard
private readonly int _boatHeight = 118; private readonly int _boatHeight = 118;
private DrawningOars drawningOars; private DrawningOars drawningOars;
public bool Init(int speed, double weight, Color bodyColor, Color additionalColor, bool motor public bool Init(int speed, double weight, Color bodyColor, Color additionalColor, bool motor, int oars, int width, int height)
//, bool bombs, bool fuelTanks
, int oars, int width, int height)
{ {
if (width < _boatWidth || height < _boatHeight) if (width < _boatWidth || height < _boatHeight)
{ {
@ -28,9 +26,7 @@ namespace Boat_Hard
_pictureWidth = width; _pictureWidth = width;
_pictureHeight = height; _pictureHeight = height;
EntityBoat = new EntityBoat(); EntityBoat = new EntityBoat();
EntityBoat.Init(speed, weight, bodyColor, additionalColor, motor EntityBoat.Init(speed, weight, bodyColor, additionalColor, motor, oars);
//, bombs, fuelTanks
, oars);
drawningOars = new DrawningOars(); drawningOars = new DrawningOars();
drawningOars.SetAmount(oars); drawningOars.SetAmount(oars);

View File

@ -14,21 +14,15 @@ namespace Boat_Hard
public Color AdditionalColor { get; private set; } public Color AdditionalColor { get; private set; }
public bool isMotor { get; private set; } public bool isMotor { get; private set; }
//public bool Bombs { get; private set; }
//public bool FuelTanks { get; private set; }
public int Oars { get; private set; } public int Oars { get; private set; }
public double Step => (double)Speed * 100 / Weight; public double Step => (double)Speed * 100 / Weight;
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool motor public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool motor, int oars)
//, bool fuelTanks
, int oars)
{ {
Speed = speed; Speed = speed;
Weight = weight; Weight = weight;
BodyColor = bodyColor; BodyColor = bodyColor;
AdditionalColor = additionalColor; AdditionalColor = additionalColor;
isMotor = motor; isMotor = motor;
//Bombs = bombs;
//FuelTanks = fuelTanks;
Oars = oars; Oars = oars;
} }
} }