Ejemplo n.º 1
0
    IEnumerator BuildTree()
    {
        for (int i = 0; i < techGroups.Count; i++)
        {
            Transform col = Instantiate(techColumn, techPanel).transform;
            for (int j = 0; j < techGroups[i].technologies.Count; j++)
            {
                TechNodeUI node = Instantiate(techNode, col);
                techNodes.Add(node);
                node.Initialize(techGroups[i].technologies[j]);
            }
        }

        yield return(0);

        for (int i = 0; i < techNodes.Count; i++)
        {
            techNodes[i].Connect(techNodes, techPanel);
        }
    }