public void StartCD(int nSkillID, float fCDtime) { if (Owner == null) { return; } DRCDdefine pCDData = GameEntry.DataTable.GetDataTable <DRCDdefine>().GetDataRow(nSkillID); if (pCDData != null) { 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; } DRCDdefine pCommonCDData = GameEntry.DataTable.GetDataTable <DRCDdefine>().GetDataRow(nCommonCD); if (pCommonCDData == null) { return; } sCDInfo info = new sCDInfo(); info.fCurTime = pCommonCDData.CDTime; info.fTotalTime = pCommonCDData.CDTime; m_CDCommonDict[pCommonCDData.Id] = info; }
private void AddCDToDict(int nCDindex, sCDInfo info) { m_CDDict.Add(nCDindex, info); }