void CreateNewTile(Vector3 vector) { if (CandidateTileDict.FindTile(vector)) { return; } GameObject newTile = (GameObject)Instantiate(TilePrefab, vector, transform.rotation); newTile.transform.parent = this.transform; newTile.GetComponent <MeshRenderer>().material = TilePlaceableMaterial; newTile.SetActive(true); TileObject tileObject = newTile.GetComponent <TileObject>(); tileObject.PlacedTileDict = PlacedTileDict; tileObject.CandidateTileDict = CandidateTileDict; CandidateTileDict.Add(vector, tileObject); }
void Initialization() { PlacedTileDict.Add(InitialTile.transform.position, InitialTile.GetComponent <TileObject>()); LastPlacedTileVectorQueue.Enqueue(InitialTile.transform.position); }