示例#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);
            }
        }
示例#2
0
 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);
     }
 }
示例#3
0
        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);
        }