void Update() { if (lastPosition != transform.position) { lastPosition = transform.position; coord = HexagonUtils.Pos2Coord(transform.position); } }
public void UpdateRange() { HexCoord c = HexagonUtils.Pos2Coord(curPosition); var r = RangeUtils.GetRangeClient(c, range); r.Add(c); indicator.SetRange(r); }
public void UpdateCoord() { coord = HexagonUtils.Pos2Coord(transform.position); transform.position = HexagonUtils.Coord2Pos(coord); }
void Start() { renderer = GetComponent <Renderer>(); coord = HexagonUtils.Pos2Coord(transform.position); lastPosition = transform.position; }