только отбросив все лишнее, мы находим свое предназначение
This commit is contained in:
parent
dd84cb56bc
commit
6e0bdadae6
@ -22,22 +22,6 @@ namespace ProjectAirplaneWithRadar.Generics
|
|||||||
{
|
{
|
||||||
return x.EntityAirplane.BodyColor.Name.CompareTo(y.EntityAirplane.BodyColor.Name);
|
return x.EntityAirplane.BodyColor.Name.CompareTo(y.EntityAirplane.BodyColor.Name);
|
||||||
}
|
}
|
||||||
if (x.GetType().Name != y.GetType().Name)
|
|
||||||
{
|
|
||||||
if (x is DrawningAirplane)
|
|
||||||
return -1;
|
|
||||||
else
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (x.GetType().Name == y.GetType().Name && x is DrawningAirplaneWithRadar)
|
|
||||||
{
|
|
||||||
EntityAirplaneWithRadar EntityX = (EntityAirplaneWithRadar)x.EntityAirplane;
|
|
||||||
EntityAirplaneWithRadar EntityY = (EntityAirplaneWithRadar)y.EntityAirplane;
|
|
||||||
if (EntityX.AdditionalColor.Name != EntityY.AdditionalColor.Name)
|
|
||||||
{
|
|
||||||
return EntityX.AdditionalColor.Name.CompareTo(EntityY.AdditionalColor.Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var speedCompare = x.EntityAirplane.Speed.CompareTo(y.EntityAirplane.Speed);
|
var speedCompare = x.EntityAirplane.Speed.CompareTo(y.EntityAirplane.Speed);
|
||||||
|
|
||||||
if (speedCompare != 0)
|
if (speedCompare != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user