Пример #1
0
 public override bool Equals(object obj)
 {
     if (obj == null)
     {
         return(false);
     }
     if (obj is CubeCoordinate)
     {
         CubeCoordinate other = (CubeCoordinate)obj;
         return(other.x == x && other.y == y && other.z == z);
     }
     return(false);
 }
Пример #2
0
 public int DistanceTo(CubeCoordinate other)
 {
     return(Mathf.Max(Mathf.Abs(x - other.x), Mathf.Abs(y - other.y), Mathf.Abs(z - other.z)));
 }
 public int DistanceTo(CubeCoordinate other)
 {
     return(ToCube().DistanceTo(other));
 }