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 LoadAllTable() { if (m_TableDefine == null || relativePathToNameDict == null || relativePathToNameDict.Count == 0) { GameLogger.DebugLog(LOG_CHANNEL.ERROR, "数据管理表尚未加载完毕"); return; } foreach (string path in relativePathToNameDict.Keys) { ResourcesProxy.LoadAsset(path, OnLoadTableComplete); } }
private static XWorldGameManagerBase RegisterGameManager(Type managerClass) { XWorldGameManagerBase newManager = Activator.CreateInstance(managerClass) as XWorldGameManagerBase; if (newManager == null) { GameLogger.Error(LOG_CHANNEL.LOGIC, "Register manager " + managerClass.ToString() + " failed!"); return(null); } GameLogger.DebugLog(LOG_CHANNEL.LOGIC, " Register manager " + managerClass.ToString()); InsertManagerToList(newManager); newManager.InitManager(); return(newManager); }