Esempio n. 1
0
            public GameObject getAsset(bool needIncrease)
            {
                if (needIncrease)
                {
                    ++_refCount;
                }

                if (!_queue.isEmpty())
                {
                    ResourceNode node = _queue.poll();

                    _parent.pickOne(id);
                    return(node.obj);
                }
                else
                {
                    //直接从LoadControl取
                    return(LoadControl.getAsset(id));
                }
            }
Esempio n. 2
0
    /** 加载完毕 */
    private void onLoadComplete()
    {
        //(被析构了)
        if (_loadState == 0)
        {
            return;
        }

        GameObject obj = LoadControl.getAsset(_loadResource);

        _modelObject = obj;

        if (ShineSetting.localLoadWithOutBundle)
        {
            UIControl.makeOnePrefab(obj);
        }

        initModelObject();

        if (isShow)
        {
            addShow();
        }
        else
        {
            removeShow();
        }

        _smodel = createModel();

        if (_smodel != null)
        {
            _smodel.init(obj);
        }

        onMakeComplete();
    }