commit 3
This commit is contained in:
parent
90dcb90e2c
commit
449a5c1655
@ -20,9 +20,9 @@ public class DrawingStormTrooper
|
||||
|
||||
private int? _startPosY;
|
||||
|
||||
private readonly int _drawingTrooperWidth = 150;
|
||||
private readonly int _drawingTrooperWidth = 140;
|
||||
|
||||
private readonly int _drawingTrooperHeight = 140;
|
||||
private readonly int _drawingTrooperHeight = 120;
|
||||
|
||||
public void Init(bool wing, int speed, double weight, Color bodyColor, Color additionalColor, bool bodyRockets, bool bombs)
|
||||
{
|
||||
@ -36,6 +36,9 @@ public class DrawingStormTrooper
|
||||
|
||||
public bool SetPictureSize(int width, int height)
|
||||
{
|
||||
|
||||
if (_drawingTrooperHeight > height || _drawingTrooperWidth > width) { return false; }
|
||||
|
||||
_pictureWidth = width;
|
||||
|
||||
_pictureHeight = height;
|
||||
@ -47,6 +50,10 @@ public class DrawingStormTrooper
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (x < 0 || y < 0 || x + _drawingTrooperWidth > _pictureWidth || y + _drawingTrooperHeight > _pictureHeight)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_startPosX = x;
|
||||
_startPosY = y;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user