public void UpdateLevelHeight(int newHeight) { Height = newHeight; //remove all tiles with position y greater of equal to height BlockingTiles.RemoveAll((t) => t.GridPosition.y >= newHeight); MoveableTiles.RemoveAll((t) => t.GridPosition.y >= newHeight); }
public void RemoveBlockingTileAtPosition(Vector2Int pos) { BlockingTiles.RemoveAll(info => info.GridPosition == pos); }
public void UpdateLevelWidth(int newWidth) { Width = newWidth; BlockingTiles.RemoveAll(t => t.GridPosition.x >= newWidth); MoveableTiles.RemoveAll(t => t.GridPosition.x >= newWidth); }