예제 #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();
        }
예제 #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();
        }
예제 #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;
            }
        }
예제 #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;
            }
        }
예제 #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;
            }
        }
예제 #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;
            }
        }