added Gridinfo

This commit is contained in:
j.mei7
2022-03-09 19:02:26 +01:00
parent 5a680495ce
commit 25ce88501d
7 changed files with 59 additions and 19 deletions

View File

@@ -15,9 +15,9 @@ public class GridBuildingSystem : MonoBehaviour
if (instance == null)
instance = this;
int gridWidth = 20;
int gridHeight = 20;
float cellSize = 1f;
int gridWidth = GridInfo.instance.gridWidth;
int gridHeight = GridInfo.instance.gridHeight;
float cellSize = GridInfo.instance.cellSize;
buildingGrid = new Grid<GridObject>(gridWidth, gridHeight, cellSize, Vector3.zero, (Grid<GridObject> g, int x, int y) => new GridObject(g, x, y));
placedObjectTypeSO = placedObjectTypeSOList[0];