private void Start() { DevTools.SetDebugOutputs(false, false); Random.InitState((int)System.DateTime.Now.Ticks); Map = new Dictionary <PieceCoordinates, MapNode>(); OriginNode.Coordinates = new PieceCoordinates(0, 0); Map.Add(OriginNode.Coordinates, OriginNode); OriginNode.Build(Map, gameObject, Depth); if (!UseMaterialColors) { Material newMat = new Material(Shader.Find("Standard")); foreach (MeshRenderer mr in GetComponentsInChildren <MeshRenderer>()) { mr.material = newMat; } } }
public IEnumerator WaitThenBuildAtNode(MapNode node, Dictionary <PieceCoordinates, MapNode> coordinateMap, GameObject rootParentGameObject, int depth) { yield return(new WaitForSeconds(0.05f)); node.Build(coordinateMap, rootParentGameObject, depth - 1); }