public void DeleteCell(HexCoords loc) { DeleteCell(CellAt(loc)); }
public bool InBounds(HexCoords loc) { return(coords.Contains(loc)); }
public TCell this[HexCoords loc] { get { return(CellAt(loc)); } }
public Vector3 GridToWorld(HexCoords loc) { return(gridTransform * new Vector3(loc.x, loc.y, 0)); }
public HexCoords WorldToGrid(Vector3 pos) { return(HexCoords.Round(gridTransform.inverse * pos)); }
public static IEnumerable <HexCoords> Line(HexCoords left, HexCoords right) { return(left.LineTo(right)); }
public static HexCoords Lerp(HexCoords left, HexCoords right, float t) { return(left.LerpTo(right, t)); }
public static int Distance(HexCoords left, HexCoords right) { return(left.DistanceTo(right)); }
public int DistanceTo(HexCoords other) { HexCoords d = other - this; return((Math.Abs(d.x) + Math.Abs(d.y) + Math.Abs(d.z)) / 2); }
public bool Adjacent(HexCoords other) { return(DistanceTo(other) == 1); }