private GameObject createNewGridTile(GridTile.tileType tileType, int xCoor, int yCoor) { Vector3 spawnPosition = new Vector3(xCoor, 0, yCoor); GameObject newGridTile = Instantiate(this.gridTile, spawnPosition, this.transform.rotation, this.transform); newGridTile.name = "GridTile " + xCoor + " " + yCoor; GridTile gridTile = newGridTile.GetComponent <GridTile>(); gridTile.currentTileType = tileType; gridTile.enableTile(); return(newGridTile); }
public TileJSONWrapper(GridTile.tileType type, int x, int y) { tileType = type; xCoor = x; yCoor = y; }