public void StartCD(int nSkillID, float fCDtime) { if (Owner == null) { return; } ConfigData pCDData = GameDataProxy.GetData(m_TableName, nSkillID); if (pCDData != null) { GameLogger.DebugLog(LOG_CHANNEL.COMBAT, "技能当前存在该技能CD组!"); StartCD(nSkillID); return; } sCDInfo info = new sCDInfo(); info.fCurTime = fCDtime; info.fTotalTime = fCDtime; if (m_CDDict.ContainsKey(nSkillID)) { float fTime = m_CDDict[nSkillID].fCurTime; fTime = Mathf.Max(fTime, info.fCurTime); m_CDDict[nSkillID].UpdateCD(fTime); } else { AddCDToDict(nSkillID, info); } }
private void AddCDToDict(int nCDindex, float fCDtime) { sCDInfo info = new sCDInfo(); info.fCurTime = fCDtime; info.fTotalTime = fCDtime; m_CDDict.Add(nCDindex, info); }
public void StartCommonCD(int nCommonCD) { if (Owner == null) { return; } ConfigData pCommonCDData = GameDataProxy.GetData(m_TableName, nCommonCD); if (pCommonCDData == null) { return; } sCDInfo info = new sCDInfo(); info.fCurTime = pCommonCDData.GetInt("CDTime"); info.fTotalTime = pCommonCDData.GetInt("CDTime"); m_CDCommonDict[pCommonCDData.GetInt("CDGroup")] = info; }
private void AddCDToDict(int nCDindex, sCDInfo info) { m_CDDict.Add(nCDindex, info); }