Пример #1
0
 void Update()
 {
     if (lastPosition != transform.position)
     {
         lastPosition = transform.position;
         coord        = HexagonUtils.Pos2Coord(transform.position);
     }
 }
Пример #2
0
    public void UpdateRange()
    {
        HexCoord c = HexagonUtils.Pos2Coord(curPosition);
        var      r = RangeUtils.GetRangeClient(c, range);

        r.Add(c);
        indicator.SetRange(r);
    }
Пример #3
0
 public void UpdateCoord()
 {
     coord = HexagonUtils.Pos2Coord(transform.position);
     transform.position = HexagonUtils.Coord2Pos(coord);
 }
Пример #4
0
 void Start()
 {
     renderer     = GetComponent <Renderer>();
     coord        = HexagonUtils.Pos2Coord(transform.position);
     lastPosition = transform.position;
 }