コード例 #1
0
 protected void AddSection(string section, string key, string value)
 {
     if (this.m_SectionDic.ContainsKey(section))
     {
         if (this.m_SectionDic[section].ContainsKey(key))
         {
             GameLogger.Warning(LOG_CHANNEL.LOGIC, string.Format("INI配置文件{0}中key重复", new object[] { section }));
         }
         else
         {
             this.m_SectionDic[section][key] = value;
         }
     }
     else
     {
         this.m_SectionDic.Add(section, new Dictionary <string, string>());
         this.m_SectionDic[section][key] = value;
     }
 }
コード例 #2
0
ファイル: GMCommand.cs プロジェクト: GeorgeLiuXin/XinWorld
        public void HandleGMCommand(string command)
        {
            string[] strs = command.Split(' ');
            if (strs.Length <= 0)
            {
                return;
            }

            string key = strs[0];

            if (!m_GMCommandDict.ContainsKey(key))
            {
                GameLogger.Error(LOG_CHANNEL.LOGIC, "GMCommand don't contain this command!");
                return;
            }
            List <string> list = new List <string>(strs);

            list.RemoveAt(0);
            object[] objs = list.ToArray();
            m_GMCommandDict[key](objs);
        }
コード例 #3
0
ファイル: ActorObj.cs プロジェクト: GeorgeLiuXin/XinWorld
        protected void OnEngineObjectLoadEnd(LoadResult result)
        {
            if (!result.isSuccess)
            {
                GameLogger.Error(LOG_CHANNEL.ERROR, "Load Engine Object Failed!  modelName : " + m_strName);
                return;
            }

            m_ModelResObj = result.assets[0] as GameObject;
            m_EngineObj   = GameObject.Instantiate(result.assets[0] as GameObject);

            //GameLogger.LogFormat(Galaxy.LOG_CHANNEL.LOGIC, "actor name = " + result.assetNames[0]);

            if (m_EngineObj == null)
            {
                GameLogger.Error(LOG_CHANNEL.ERROR, "Create Engine Object Failed!  modelName : " + m_strName);
                return;
            }

            ClientID = m_EngineObj.gameObject.GetInstanceID();
            AfterCreateEngineObj();
            SetOwner(this);
        }