PIbd-22 Chubykina P.P. LabWork_02 #2
@ -24,8 +24,7 @@ namespace Sailboat.MovementStrategy
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return new ObjectParameters(_drawingBoat.GetPosX,
|
||||
_drawingBoat.GetPosY, _drawingBoat.GetWidth, _drawingBoat.GetHeight);
|
||||
return new ObjectParameters(_drawingBoat.GetPosX, _drawingBoat.GetPosY, _drawingBoat.GetWidth, _drawingBoat.GetHeight);
|
||||
}
|
||||
}
|
||||
public int GetStep => (int)(_drawingBoat?.EntityBoat?.Step ?? 0);
|
||||
|
@ -11,8 +11,7 @@ namespace Sailboat.DrawingObjects
|
||||
{
|
||||
public class DrawingSailboat : DrawingBoat
|
||||
{
|
||||
public DrawingSailboat(int speed, double weight, Color bodyColor, Color
|
||||
additionalColor, bool hull, bool sail, int width, int height) :
|
||||
public DrawingSailboat(int speed, double weight, Color bodyColor, Color additionalColor, bool hull, bool sail, int width, int height) :
|
||||
base(speed, weight, bodyColor, width, height, 160, 160)
|
||||
{
|
||||
if (EntityBoat != null)
|
||||
|
@ -65,7 +65,6 @@ namespace Sailboat
|
||||
}
|
||||
Draw();
|
||||
}
|
||||
|
||||
private void buttonStep_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_drawingBoat == null)
|
||||
@ -101,6 +100,5 @@ namespace Sailboat
|
||||
_abstractStrategy = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -50,6 +50,5 @@ namespace Sailboat.MovementStrategy
|
||||
_width = width;
|
||||
_height = height;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user