Еще допилил
This commit is contained in:
parent
0d6eaae75d
commit
b18af9ef6c
@ -11,12 +11,12 @@ namespace Monorail.DrawningObjects
|
||||
public class DrawningAdvancedMonorail : DrawningMonorail
|
||||
{
|
||||
public DrawningAdvancedMonorail(int speed, double weight, Color bodyColor, Color wheelColor, Color tireColor, int width, int height, int addWheelsNumb,
|
||||
Color secondCabineColor, bool secondCabine, bool magniteRail) : base(speed, weight, bodyColor, wheelColor, tireColor, width, height)
|
||||
Color additionalColor, bool secondCabine, bool magniteRail) : base(speed, weight, bodyColor, wheelColor, tireColor, width, height)
|
||||
{
|
||||
if(EntityMonorail != null)
|
||||
{
|
||||
EntityMonorail = new EntityAdvancedMonorail(speed, weight, bodyColor, wheelColor, tireColor,
|
||||
addWheelsNumb, secondCabineColor, secondCabine, magniteRail);
|
||||
addWheelsNumb, additionalColor, secondCabine, magniteRail);
|
||||
}
|
||||
}
|
||||
public override void DrawTransport(Graphics g)
|
||||
@ -33,8 +33,8 @@ namespace Monorail.DrawningObjects
|
||||
{
|
||||
return;
|
||||
}
|
||||
Pen additionalPen = new(advancedMonorail.TireColor);
|
||||
Brush additionalBrush = new SolidBrush(advancedMonorail.WheelColor);
|
||||
Pen additionalPen = new(advancedMonorail.AdditionalColor);
|
||||
Brush additionalBrush = new SolidBrush(advancedMonorail.AdditionalColor);
|
||||
|
||||
//3 колеса
|
||||
if (advancedMonorail.AddWheelsNumb >= 3)
|
||||
|
@ -9,7 +9,7 @@ namespace Monorail.Entities
|
||||
{
|
||||
public class EntityAdvancedMonorail : EntityMonorail
|
||||
{
|
||||
public Color additionalColor { get; private set; }
|
||||
public Color AdditionalColor { get; private set; }
|
||||
public int AddWheelsNumb { get; private set; }
|
||||
|
||||
public bool SecondCabine { get; private set; }
|
||||
@ -18,7 +18,7 @@ namespace Monorail.Entities
|
||||
public EntityAdvancedMonorail(int speed, double weight, Color bodyColor, Color wheelColor,
|
||||
Color tireColor, int addWheelsNumb, Color secondCabineColor, bool secondCabine, bool magniteRail) : base(speed, weight, bodyColor, wheelColor, tireColor)
|
||||
{
|
||||
additionalColor = secondCabineColor;
|
||||
AdditionalColor = secondCabineColor;
|
||||
AddWheelsNumb = addWheelsNumb;
|
||||
SecondCabine = secondCabine;
|
||||
MagniteRail = magniteRail;
|
||||
|
@ -27,7 +27,7 @@ namespace Monorail.MovementStrategy
|
||||
{
|
||||
return;
|
||||
}
|
||||
var diffX = objParams.RightBorder - (FieldWidth);
|
||||
var diffX = objParams.RightBorder - FieldWidth;
|
||||
if (Math.Abs(diffX) > GetStep())
|
||||
{
|
||||
if (diffX < 0)
|
||||
@ -35,7 +35,7 @@ namespace Monorail.MovementStrategy
|
||||
MoveRight();
|
||||
}
|
||||
}
|
||||
var diffY = objParams.DownBorder - (FieldHeight-1);
|
||||
var diffY = objParams.DownBorder - FieldHeight;
|
||||
if (Math.Abs(diffY) > GetStep())
|
||||
{
|
||||
if (diffY < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user