fix(2)
This commit is contained in:
parent
a7aa4f92d6
commit
3c14b35930
@ -36,13 +36,18 @@ namespace Liner
|
||||
|
||||
public bool Equals(IDrawingObject? other)
|
||||
{
|
||||
if (other is not DrawingObjectShip otherShip)
|
||||
if (other == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var otherShip = other as DrawingObjectShip;
|
||||
if (otherShip == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var ship = _ship.Ship;
|
||||
var otherShipShip = otherShip._ship.Ship;
|
||||
if (ship.GetType() != otherShipShip.GetType())
|
||||
if (ship.GetType().Name != otherShipShip.GetType().Name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -76,4 +81,6 @@ namespace Liner
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user