public StringGridObject(GridXZ <StringGridObject> grid, int x, int y) { this.grid = grid; this.x = x; this.y = y; this.letters = x + ", " + y; this.numbers = ""; }
void Awake() { Instance = this; int gridWith = 10; int gridHeight = 10; float cellSize = 1f; grid = new GridXZ <GridObject>(gridWith, gridHeight, cellSize, new Vector3(-5, 0, -5), (GridXZ <GridObject> g, int x, int y) => new GridObject(g, x, y)); placedObjectTypeSO = placedObjectTypeSOList[0]; }
// Start is called before the first frame update void Start() { //rid = new Grid<bool>(5, 5, 1f, new Vector3(-5, 0), () => false); //grid = new Grid<StringGridObject>(5, 5, 1f, new Vector3(-5, 0), (Grid<StringGridObject> g, int x, int y) => new StringGridObject(g, x, y)); gridXZ = new GridXZ <StringGridObject>(5, 5, 1f, new Vector3(-5, 0, -5), (GridXZ <StringGridObject> g, int x, int y) => new StringGridObject(g, x, y)); }
public GridObject(GridXZ <GridObject> grid, int x, int z) { this.grid = grid; this.x = x; this.z = z; }