Готовая Лабораторная 4

This commit is contained in:
Никита Белянин 2023-11-13 01:22:52 +04:00
parent d0c318b85d
commit 541f653761

View File

@ -20,7 +20,7 @@ public class DrawingTank extends DrawingArmoVehicle {
return; return;
} }
// Установка позиций // Установка позиции
public void SetPosition(int x, int y) { public void SetPosition(int x, int y) {
_startPosX = Math.min(x, _pictureWidth-_TankWidth); _startPosX = Math.min(x, _pictureWidth-_TankWidth);
_startPosY = Math.min(y, _pictureHeight-_TankHeight); _startPosY = Math.min(y, _pictureHeight-_TankHeight);
@ -30,6 +30,7 @@ public class DrawingTank extends DrawingArmoVehicle {
return OrnamentAdd; return OrnamentAdd;
} }
// Прорисовка объекта
public void DrawTransport(Graphics2D g) { public void DrawTransport(Graphics2D g) {
if (ArmoVehicle == null) { if (ArmoVehicle == null) {
return; return;