Esempio n. 1
0
    private List <string> depends = new List <string>();                                 //依赖

    public BasePool(string url, E_PoolType pt)
    {
        this.url   = url;
        this.PType = pt;
        string name = "[{0}][{1}][{2}]";

        name = string.Format(name, "root", pt.ToString(), url.ToString());
        GameObject go = new GameObject(name);

        root = go.transform;
        ManifestMgr.getDepends(url, ref depends);
        root.SetParent(PoolMgr.Instance.PoolRoot);
        root.transform.localPosition = Vector3.zero;
    }
Esempio n. 2
0
    public BasePool(string resName, string resPath, E_PoolMode mode, E_PoolType pType, float time)
    {
        this.resName = resName;
        this.resPath = resPath;
        pMode        = mode;
        this.pType   = pType;
        lifeTime     = time;
        string     poolName = string.Format("[{0}][{1}][{2}]", mode.ToString(), pType.ToString(), resName);
        GameObject go       = new GameObject(poolName);

        this.poolRoot = go.transform;
        this.poolRoot.SetParent(PoolMgr.Instance.PoolRoot);
        this.poolRoot.transform.localPosition = Vector3.zero;
        initialize();
    }