Ejemplo n.º 1
0
        public override GameObject _borrowObj(string name)
        {
            GameObject go = base._borrowObj(name);

            if (go != null)
            {
                CLUIUtl.resetAtlasAndFont(go.transform, false);
            }
            return(go);
        }
Ejemplo n.º 2
0
        public static void finishGetPanel(string pName, AssetBundle ab, object callback, object paras)
        {
            if (ab != null)
            {
                GameObject prefab = ab.mainAsset as GameObject;
                ab.Unload(false);
                ab = null;
                GameObject go = GameObject.Instantiate(prefab) as GameObject;
                go.name                    = pName;
                go.transform.parent        = self.transform;
                go.transform.localScale    = Vector3.one;
                go.transform.localPosition = Vector3.zero;

                CLPanelBase p = go.GetComponent <CLPanelBase>();
                if (p.isNeedResetAtlase)
                {
                    CLUIUtl.resetAtlasAndFont(p.transform, false);
                }
                panelBuff[pName]        = p;
                panelAssetBundle[pName] = p;

                CLSharedAssets sharedAsset = go.GetComponent <CLSharedAssets>();
                if (sharedAsset != null)
                {
                    NewList param = ObjPool.listPool.borrowObject();
                    param.Add(callback);
                    param.Add(p);
                    param.Add(paras);
                    sharedAsset.init((Callback)onGetSharedAssets, param, null);
                }
                else
                {
                    if (p != null)
                    {
                        Utl.doCallback(callback, p, paras);
                    }
                }
            }
            NGUITools.SetActive(self.mask, false);
            return;// null;
        }