private void SpawnBoulder() { BoulderManager = Instantiate(Boulder, transform.position + new Vector3(0f, 1f, 0f), new Quaternion()) as GameObject; if (Colour != "" && Colour != null) { GridPlacer.UpdateAllMaterials(BoulderManager, "Colour (Instance)", ColourEventManager.ColourMaterials[Colour]); } }
private void PlaceObject(string name, int x, int y, int z, EDirection direction, string colour) { grid.CreateGridObject(name, new Vector3Int(x, y, z), direction, out tempObject); if (colour != "") { tempObject.GetComponentInChildren <IGridObject>().Colour = colour; GridPlacer.UpdateAllMaterials(tempObject, "Colour (Instance)", ColourEventManager.ColourMaterials[colour]); } }