override public void dispose() { if (m_skelAnim != null) { Ctx.m_instance.m_skelAniMgr.unload(m_skelAnim.GetPath(), onLoaded); m_skelAnim = null; } m_skelLoadDisp.clearEventHandle(); }
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; } }
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; } }
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; } }