/// <summary> /// Update bounds based on the added coordinate. /// </summary> /// <param name="inCoordinate">Coordinate to extend the bounds with.</param> private void UpdateBounds(Vector2Int inCoordinate) { if (_gridBounds == null) { _gridBounds = new Vector2IntRect(inCoordinate); } else { _gridBounds.UpdateRect(inCoordinate); } }
/// <summary> /// Clear the tile dictionary and save. /// </summary> public void ClearTiles() { Tiles.Clear(); _gridBounds = null; Save(); }