Example #1
0
    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;
            }
        }
    }
Example #2
0
    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);
    }