public void dispose() { if (m_controlRes != null) { Ctx.m_instance.m_controllerMgr.unload(m_controlRes.GetPath(), null); m_controlRes = null; } if (m_animator != null) { UtilApi.Destroy(m_animator.runtimeAnimatorController); } if (m_nextFrametimer != null) { Ctx.m_instance.m_frameTimerMgr.delObject(m_nextFrametimer); m_nextFrametimer = null; } if (m_idleStateFrametimer != null) { Ctx.m_instance.m_frameTimerMgr.delObject(m_idleStateFrametimer); m_idleStateFrametimer = null; } if (m_oneAniEndTimer != null) { Ctx.m_instance.m_timerMgr.delObject(m_oneAniEndTimer); m_oneAniEndTimer = null; } m_oneAniPlayEndDisp.clearEventHandle(); }
public void dispose() { if (m_controlRes != null) { Ctx.m_instance.m_controllerMgr.unload(m_controlRes.GetPath(), null); m_controlRes = null; } if(m_animator != null) { UtilApi.Destroy(m_animator.runtimeAnimatorController); } if(m_nextFrametimer != null) { Ctx.m_instance.m_frameTimerMgr.delObject(m_nextFrametimer); m_nextFrametimer = null; } if (m_idleStateFrametimer != null) { Ctx.m_instance.m_frameTimerMgr.delObject(m_idleStateFrametimer); m_idleStateFrametimer = null; } if (m_oneAniEndTimer != null) { Ctx.m_instance.m_timerMgr.delObject(m_oneAniEndTimer); m_oneAniEndTimer = null; } m_oneAniPlayEndDisp.clearEventHandle(); }
public void dispose() { if (m_nextFrametimer != null) { Ctx.m_instance.m_frameTimerMgr.delObject(m_nextFrametimer); m_nextFrametimer = null; } }
public void onNextFrameHandle(FrameTimerItem timer) { Ctx.m_instance.m_logSys.log(string.Format("当前帧 {0}", timer.m_curFrame)); if (canStopNextFrameTimer()) { timer.m_disposed = true; startOneAniEndTimer(); } }
// 启动下一帧定时器 protected void startNextFrameTimer() { if (m_nextFrametimer == null) { m_nextFrametimer = new FrameTimerItem(); m_nextFrametimer.m_timerDisp = onNextFrameHandle; m_nextFrametimer.m_internal = 1; m_nextFrametimer.m_totalFrameCount = 1; } else { m_nextFrametimer.reset(); } Ctx.m_instance.m_frameTimerMgr.addObject(m_nextFrametimer); }
// 默认状态监测处理器 public void onIdleStateFrameHandle(FrameTimerItem timer) { Ctx.m_instance.m_logSys.log(string.Format("Idle 当前帧 {0}", timer.m_curFrame)); if (canStopIdleFrameTimer()) { m_bIdleStateDetect = false; timer.m_disposed = true; if (m_stateValue != 0) { normalStateSetInteger(m_stateHashId, m_stateValue); } else { m_animator.enabled = false; // 切换到空闲状态的时候,关闭,这样才能缩放 } } }
// 启动默认状态定时器 protected void startIdleStateFrameTimer() { if (m_idleStateFrametimer == null) { m_idleStateFrametimer = new FrameTimerItem(); m_idleStateFrametimer.m_timerDisp = onIdleStateFrameHandle; m_idleStateFrametimer.m_internal = 1; m_idleStateFrametimer.m_bInfineLoop = true; } else { m_idleStateFrametimer.reset(); } m_bIdleStateDetect = true; Ctx.m_instance.m_frameTimerMgr.addObject(m_idleStateFrametimer); }
public void onNextFrameHandle(FrameTimerItem timer) { updateElem(); }