Точно Done

This commit is contained in:
gg12 darfren 2023-10-17 12:32:59 +04:00
parent 77f0c3372d
commit 321ec13a27

View File

@ -41,6 +41,13 @@ public class DrawningMonorail {
int dif = _monorailWidth / 10;
DrawningWheels = new DrawningWheelsCart(_monorailWidth - dif, _monorailHeight,_startPosX,_startPosY,wheelColor,tireColor,monorailPanel);
Random rand = new Random();
int variant = rand.nextInt(0, 3);
if(variant == 0)
DrawningWheels = new DrawningWheels(_monorailWidth - dif, _monorailHeight,_startPosX,_startPosY,wheelColor,tireColor,monorailPanel);
else if(variant == 1)
DrawningWheels = new DrawningWheelsCart(_monorailWidth - dif, _monorailHeight,_startPosX,_startPosY,wheelColor,tireColor,monorailPanel);
else
DrawningWheels = new DrawningWheelsOrn(_monorailWidth - dif, _monorailHeight,_startPosX,_startPosY,wheelColor,tireColor,monorailPanel);
DrawningWheels.ChangeWheelsNumb(rand.nextInt(1, 6));
}
@ -60,8 +67,15 @@ public class DrawningMonorail {
_monorailHeight = monorailHeight;
EntityMonorail = new EntityMonorail(speed, weight, bodyColor, wheelColor, tireColor);
int dif = _monorailWidth / 10;
DrawningWheels = new DrawningWheelsCart(_monorailWidth - dif, _monorailHeight,_startPosX,_startPosY,wheelColor,tireColor,monorailPanel);
Random rand = new Random();
int variant = rand.nextInt(0, 3);
if(variant == 0)
DrawningWheels = new DrawningWheels(_monorailWidth - dif, _monorailHeight,_startPosX,_startPosY,wheelColor,tireColor,monorailPanel);
else if(variant == 1)
DrawningWheels = new DrawningWheelsCart(_monorailWidth - dif, _monorailHeight,_startPosX,_startPosY,wheelColor,tireColor,monorailPanel);
else
DrawningWheels = new DrawningWheelsOrn(_monorailWidth - dif, _monorailHeight,_startPosX,_startPosY,wheelColor,tireColor,monorailPanel);
DrawningWheels.ChangeWheelsNumb(rand.nextInt(1, 6));
}