示例#1
0
文件: DLA.cs 项目: andruzzi/DLA
    private void Init()
    {
        walkers = new List <Walker>();
        cluster = new List <Walker>();

        // ROOT
        Walker root = Instantiate(walkerPrefab).GetComponent <Walker>();

        walkers.Add(root);
        root.Init(true);
        root.gameObject.name = "ROOT";

        for (int i = 0; i < MaxWalkers - 1; i++)
        {
            Walker g = Instantiate(walkerPrefab).GetComponent <Walker>();
            walkers.Add(g);
            g.Init();
        }
    }