Beispiel #1
0
    void AddDic(GameobjectSO a, ref Dictionary <string, GameObject> b)       //把SO存放的Gameobjects全部放到字典中
    {
        int length = a.keys.Count;

        b = new Dictionary <string, GameObject>(length);
        for (int i = 0; i < length; i++)
        {
            b.Add(a.keys[i], a.values[i]);
        }
    }
Beispiel #2
0
    void NewListData(GameobjectSO a, ref Dictionary <string, Pool> b)     //SO里有多少个Gameobjects就创建多少个Pool数据,并放到字典里
    {
        int length = a.keys.Count;

        b = new Dictionary <string, Pool>(length);
        for (int i = 0; i < length; i++)
        {
            Pool obj = new Pool();
            b.Add(a.keys[i], obj);
        }
    }