public int DistanceFrom(LayeredPoint <TPoint> other) { return(point.DistanceFrom(other.point) + Mathf.Abs(layer - other.layer)); }
object IGrid <LayeredPoint <TPoint> > .this[LayeredPoint <TPoint> point] { get { return(this[point]); } set { this[point] = (TCell)value; } }
public bool Equals(LayeredPoint <TPoint> other) { return(layer == other.layer && point.Equals(other.point)); }
/** * 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(); }