Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        private void AddCDToDict(int nCDindex, float fCDtime)
        {
            sCDInfo info = new sCDInfo();

            info.fCurTime   = fCDtime;
            info.fTotalTime = fCDtime;
            m_CDDict.Add(nCDindex, info);
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
 private void AddCDToDict(int nCDindex, sCDInfo info)
 {
     m_CDDict.Add(nCDindex, info);
 }