protected void onMin2HandleEnd(NumAniBase ani) { //m_startAni.stateId = 0; //m_startAni.play(); m_onEnterHandleEntryDisp.dispatchEvent(this.m_card); Ctx.m_instance.m_logSys.log("自己卡牌从场景区域到手牌区域动画结束"); }
public void nextOneAttact() { if (m_curFightData == null) // 如果当前没有攻击进行 { if (m_cacheList.Count() > 0) // 如果有攻击数据 { while (m_cacheList.Count() > 0) // 死亡是可以并行执行的 { m_curFightData = m_cacheList[0]; Ctx.m_instance.m_logSys.fightLog(string.Format("\n[Fight] 开始进行第 {0} 回合中的第 {1} 次战斗", m_uniqueId, m_curFightData.uniqueId)); m_cacheList.Remove(m_curFightData); m_curFightData.processOneAttack(); if (m_cacheList.Count() > 0) { m_nextFightData = m_cacheList[0]; if (!canParallelExec(m_curFightData, m_nextFightData)) { break; } } } } else if (m_bSvrRoundEnd) // 服务器通知才算是结算 { m_roundEndDisp.dispatchEvent(this); } } }
public void syncUpdateModel() { if (m_bNeedReloadModel) { if (m_modelRes != null) { Ctx.m_instance.m_modelMgr.unload(m_modelRes.GetPath(), null); m_modelRes = null; } if (m_selfGo != null) { UtilApi.Destroy(m_selfGo); m_selfGo = null; } m_modelRes = Ctx.m_instance.m_modelMgr.getAndSyncLoad <ModelRes>(m_modelResPath); selfGo = m_modelRes.InstantiateObject(m_modelResPath); attach2Parent(); m_modelInsDisp.dispatchEvent(this); } m_bNeedReloadModel = false; }
// 一个受伤播放结束 public void onOneHurtExecEnd(IDispatchObject dispObj) { Ctx.m_instance.m_logSys.log("删除当前被击项"); // 直接移除,不会在循环中删除的情况 removeItem(dispObj as HurtItemBase); // 检查是否所有的受伤都播放结束 if (m_hurtList.Count() == 0) { m_allHurtExecEndDisp.dispatchEvent(this); } }
public void RunTask() { if (this.queue.IsEmpty) { this.isWait = true; handle.WaitOne(); this.isWait = false; } ByteBuffer buf; //放在这里的作用??这里是当做返回值来用 this.queue.TryDequeue(out buf); EventDispatch.dispatchEvent(buf.Type, buf); }
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; } }
virtual protected void dispEndEvent() { m_playEndEventDispatch.dispatchEvent(this); }
// 开始卡牌动画播放结束 protected void onEnemyFaPaiAniEnd(NumAniBase ani) { m_onEnterHandleEntryDisp.dispatchEvent(this.m_card); Ctx.m_instance.m_logSys.log("Enemy 卡牌从发牌区域到手牌区域动画结束"); }
// 这个是整个受伤执行结束 virtual public void onHurtExecEnd(IDispatchObject dispObj) { m_execState = EHurtExecState.eEnd; m_hurtExecEndDisp.dispatchEvent(this); }