This commit is contained in:
shadowik 2022-12-15 06:23:03 +04:00
parent 85f5d7f093
commit 60be921810

View File

@ -74,24 +74,26 @@ namespace DoubleDeckerBus
return false;
}
var bus = _bus.Bus;
var otherCarCar = otherBus._bus.Bus;
if (bus.Speed != otherCarCar.Speed)
var otherBusBus = otherBus._bus.Bus;
if (bus.GetType().Name != otherBusBus.GetType().Name)
{
return false;
}
if (bus.Weight != otherCarCar.Weight)
if (bus.Speed != otherBusBus.Speed)
{
return false;
}
if (bus.BodyColor != otherCarCar.BodyColor)
if (bus.Weight != otherBusBus.Weight)
{
return false;
}
if (bus.BodyColor != otherBusBus.BodyColor)
{
return false;
}
if (bus is EntityDDB DDB) {
if (other is not EntityDDB otherDDB) {
return false;
}
if (bus is EntityDDB DDB && otherBusBus is EntityDDB otherDDB)
{
if (DDB.Ledder != otherDDB.Ledder) {
return false;
@ -105,6 +107,7 @@ namespace DoubleDeckerBus
{
return false;
}
}
return true;