Example #1
0
        override public void dispose()
        {
            if (m_skelAnim != null)
            {
                Ctx.m_instance.m_skelAniMgr.unload(m_skelAnim.GetPath(), onLoaded);
                m_skelAnim = null;
            }

            m_skelLoadDisp.clearEventHandle();
        }
Example #2
0
        override public void dispose()
        {
            if (m_skelAnim != null)
            {
                Ctx.m_instance.m_skelAniMgr.unload(m_skelAnim.GetPath(), onLoaded);
                m_skelAnim = null;
            }

            m_skelLoadDisp.clearEventHandle();
        }
Example #3
0
        public void loadSkelAnim()
        {
            if (m_bNeedReloadSkel)
            {
                if (m_skelAnim != null)
                {
                    Ctx.m_instance.m_skelAniMgr.unload(m_skelAnim.GetPath(), onLoaded);
                    m_skelAnim = null;
                }

                m_skelAnim        = Ctx.m_instance.m_skelAniMgr.getAndAsyncLoad <SkelAnimRes>(m_skelAnimPath, onLoaded) as SkelAnimRes;
                m_bNeedReloadSkel = false;
            }
        }
Example #4
0
        public void loadSkelAnim()
        {
            if (m_bNeedReloadSkel)
            {
                if (m_skelAnim != null)
                {
                    Ctx.m_instance.m_skelAniMgr.unload(m_skelAnim.GetPath(), onLoaded);
                    m_skelAnim = null;
                }

                m_skelAnim = Ctx.m_instance.m_skelAniMgr.getAndAsyncLoad<SkelAnimRes>(m_skelAnimPath, onLoaded) as SkelAnimRes;
                m_bNeedReloadSkel = false;
            }
        }
Example #5
0
        public void onLoaded(IDispatchObject dispObj)
        {
            SkelAnimRes res = dispObj as SkelAnimRes;

            Ctx.m_instance.m_logSys.logLoad(res);

            if (res.refCountResLoadResultNotify.resLoadState.hasSuccessLoaded())
            {
                this.selfGo = res.InstantiateObject(res.GetPath());
                m_skelLoadDisp.dispatchEvent(this);
            }
            else if (res.refCountResLoadResultNotify.resLoadState.hasFailed())
            {
                Ctx.m_instance.m_skelAniMgr.unload(res.GetPath(), onLoaded);
                m_skelAnim = null;
            }
        }
Example #6
0
        public void onLoaded(IDispatchObject dispObj)
        {
            SkelAnimRes res = dispObj as SkelAnimRes;
            Ctx.m_instance.m_logSys.logLoad(res);

            if (res.refCountResLoadResultNotify.resLoadState.hasSuccessLoaded())
            {
                this.selfGo = res.InstantiateObject(res.GetPath());
                m_skelLoadDisp.dispatchEvent(this);
            }
            else if (res.refCountResLoadResultNotify.resLoadState.hasFailed())
            {
                Ctx.m_instance.m_skelAniMgr.unload(res.GetPath(), onLoaded);
                m_skelAnim = null;
            }
        }