Пример #1
0
        public void Init()
        {
            string TextJsonStr = ResourcesManager.Instance.GetTableStr("Text", ResDefine.UnloadImmediatelyScenary);

            _tableTexts = Newtonsoft.Json.JsonConvert.DeserializeObject <Table_Text[]>(TextJsonStr);
            ResourcesManager.Instance.UnloadScenary(ResDefine.UnloadImmediatelyScenary);
            for (int i = 0; i < _tableTexts.Length; i++)
            {
                if (!Table_TextDic.ContainsKey(_tableTexts[i].Id))
                {
                    Table_TextDic.Add(_tableTexts[i].Id, _tableTexts[i]);
                }
                else
                {
                    LogTool.Warning("_tableTexts table.Id {0} is duplicated!", _tableTexts[i].Id);
                }
            }
        }