private void DeleteObstacles(Vector2Int[] cells) { foreach (var cell in cells) { if (obstacleSpawns.In2DArrayBounds(cell)) { var gobj = obstacleSpawns[cell.x, cell.y]; if (gobj != null) { Destroy(gobj); } } } }
private void DeleteObstacles(Vector2Int[] cells) { foreach (var cell in cells) { if (obstacleSpawns.In2DArrayBounds(cell)) { var gobj = obstacleSpawns[cell.x, cell.y]; if (gobj != null) { Destroy(gobj); } } } }