//установка тега для задания проходимости всех нод, где расположен текущий объекта public void DoUpdateGraphs(GridTags tag) { foreach (Node node in GetNodes()) { node.tags = (int)tag; } }
public void SetPossibleSpawnPoints(Vector2 pos, GridTags tag) { Vector2Int posInt = new Vector2Int((int)pos.x, (int)pos.y); posInt = CoordinatesConverter.MatrixIndexToCoordinate(posInt, SharedVariables.matrixDimensions.x); if (tag == GridTags.Empty) { if (!possibleSpawnPoints.Contains(posInt)) { possibleSpawnPoints.Add(posInt); } } else { if (possibleSpawnPoints.Contains(posInt)) { possibleSpawnPoints.Remove(posInt); } } }