Exemplo n.º 1
0
    private void RemoveWayPoint(Vector3Int pos, RangeWayPoint wayPoint)
    {
        Centers.Remove(pos);

        positions.Remove(pos);
        RemoveRange(wayPoint);
    }
Exemplo n.º 2
0
    private void AddWayPoint(Vector3Int pos, RangeWayPoint wayPoint)
    {
        Centers.Add(pos);

        positions.Add(pos, wayPoint);
        AddRange(wayPoint);
    }
Exemplo n.º 3
0
 private void RemoveRange(RangeWayPoint wayPoint)
 {
     Vector3Int[] bound = wayPoint.Bound();
     for (int i = 0; i < bound.Length; i++)
     {
         if (positions[bound[i]] == wayPoint)
         {
             positions.Remove(bound[i]);
         }
     }
 }
Exemplo n.º 4
0
 private void AddRange(RangeWayPoint wayPoint)
 {
     Vector3Int[] bound = wayPoint.Bound();
     for (int i = 0; i < bound.Length; i++)
     {
         if (!positions.ContainsKey(bound[i]))
         {
             positions.Add(bound[i], wayPoint);
         }
     }
 }