Пример #1
0
 public int DistanceFrom(LayeredPoint <TPoint> other)
 {
     return(point.DistanceFrom(other.point) + Mathf.Abs(layer - other.layer));
 }
Пример #2
0
 object IGrid <LayeredPoint <TPoint> > .this[LayeredPoint <TPoint> point]
 {
     get { return(this[point]); }
     set { this[point] = (TCell)value; }
 }
Пример #3
0
 public bool Equals(LayeredPoint <TPoint> other)
 {
     return(layer == other.layer && point.Equals(other.point));
 }
Пример #4
0
 /**
  *      This method is not implemented. If you need a layered grid with neighbors configured (for example,
  *      if you want to use path finding or connected shapes), you need to make your own layered grid by extending from this one,
  *      and implement this method.
  */
 virtual public IEnumerable <LayeredPoint <TPoint> > GetAllNeighbors(LayeredPoint <TPoint> point)
 {
     //override this for your use!
     throw new NotImplementedException();
 }