// 开始观察卡牌 public void startWatch(uint id) { if (m_cardId != id) { m_cardId = id; if (m_watchStage == WatchStage.eStartTimer) // 如果当前有在观察出牌 { m_timer.reset(); // 重新计时 } else { startTimer(); } startWatchCard(); } }
// 启动初始化定时器 public void startInitCardTimer() { Ctx.m_instance.m_logSys.log(Ctx.m_instance.m_langMgr.getText(LangTypeId.eDZ4, LangItemID.eItem4)); if (m_timer == null) { m_timer = new TimerItemBase(); } else { m_timer.reset(); // 重置内部数据 } m_timer.m_internal = m_sceneDZData.m_DZDaoJiShiXmlLimit.m_preparetime - m_sceneDZData.m_DZDaoJiShiXmlLimit.m_lastpreparetime; m_timer.m_totalTime = m_timer.m_internal; m_timer.m_timerDisp = onTimerInitCardHandle; Ctx.m_instance.m_timerMgr.addObject(m_timer); }
// 启动初始化定时器 protected void startTimer() { m_watchStage = WatchStage.eStartTimer; if (m_timer == null) { m_timer = new TimerItemBase(); } else { m_timer.reset(); // 重置内部数据 } m_timer.m_internal = 0.5f; m_timer.m_totalTime = 0.5f; m_timer.m_timerDisp = onTimerEndHandle; Ctx.m_instance.m_timerMgr.addObject(m_timer); }