Esempio n. 1
0
 public void onInit()
 {
     for (int i = 0; i < depends.Count; i++)
     {
         AssetMgr.addRef(depends[i], 1);
     }
     AssetMgr.addRef(url, 1);
 }
Esempio n. 2
0
    private void insObj(Action <GameObject> callBack)
    {
        GameObject go = GameObject.Instantiate(this.obj) as GameObject;

        GameObject.DontDestroyOnLoad(go);
        PoolObj po = go.AddComponent <PoolObj>();

        po.resName = resName;
        for (int i = 0; i < deps.Count; i++)
        {
            AssetMgr.addRef(deps[i]);
        }
        AssetMgr.addRef(resName);
        callBack.Invoke(go);
    }
Esempio n. 3
0
    void doCheck(string name)
    {
        //1 ab池子是否已经有了
        bool hasAB = AssetMgr.has(name);

        if (hasAB)
        {
            AssetMgr.addRef(name);
            taskFinish("");
        }
        else
        {
            //如果加载任务里面有此任务 则加回调
            if (LoadMgr.hasTask(name))
            {
                LoadMgr.addHandler(name, taskFinish);
            }
            else
            {
                string resPath = Path.Combine(Define.abPre, name).ToLower();
                LoadMgr.doLoad(name, resPath, taskFinish);
            }
        }
    }
Esempio n. 4
0
 //添加引用
 public static void addRef(string resName)
 {
     AssetMgr.addRef(resName);
 }