| | |
| | | AddAsyncTask<FestivalRedpackTaskConfig>();
|
| | | AddAsyncTask<HolidayHomingConfig>();
|
| | | AddAsyncTask<HolidayHomingPointConfig>();
|
| | | |
| | |
|
| | | while (!AllCompleted())
|
| | | {
|
| | | var completedCount = 0;
|
| | |
| | | var container = _task.container as Dictionary<string, ConfigBase>;
|
| | | for (int i = 3; i < _task.contentLines.Length; i++)
|
| | | {
|
| | | var contents = _task.contentLines[i].Split(new string[] { "\t" }, StringSplitOptions.None);
|
| | | if (contents.Length <= 1)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | var newConfig = new T();
|
| | | newConfig.SetRawContent(contents);
|
| | |
|
| | | newConfig.Parse();
|
| | | newConfig.PostProcess();
|
| | | newConfig.Parse(_task.contentLines[i]);
|
| | | if (newConfig is IConfigPostProcess)
|
| | | {
|
| | | (newConfig as IConfigPostProcess).OnConfigParseCompleted();
|
| | | }
|
| | |
|
| | | newConfig.parsed = true;
|
| | | container[contents[0]] = newConfig;
|
| | |
|
| | | container[newConfig.getKey()] = newConfig;
|
| | | count++;
|
| | | if (count >= 500)
|
| | | {
|
| | |
| | | {
|
| | | for (int i = 3; i < _task.contentLines.Length; i++)
|
| | | {
|
| | | var contents = _task.contentLines[i].Split(new string[] { "\t" }, StringSplitOptions.None);
|
| | | if (contents.Length <= 1)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | var newConfig = new T();
|
| | | newConfig.SetRawContent(contents);
|
| | |
|
| | | newConfig.Parse();
|
| | | newConfig.PostProcess();
|
| | | newConfig.Parse(_task.contentLines[i]);
|
| | |
|
| | | if (newConfig is IConfigPostProcess)
|
| | | {
|
| | | (newConfig as IConfigPostProcess).OnConfigParseCompleted();
|
| | | }
|
| | |
|
| | | newConfig.parsed = true;
|
| | |
|
| | | _task.container[contents[0]] = newConfig;
|
| | | _task.container[newConfig.getKey()] = newConfig;
|
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | |
| | | else
|
| | | {
|
| | | config = dic[_dwTemplateID];
|
| | | }
|
| | |
|
| | | if (config != null && !config.parsed)
|
| | | {
|
| | | config.Parse();
|
| | | config.PostProcess();
|
| | | config.parsed = true;
|
| | | }
|
| | |
|
| | | return config as T;
|
| | |
| | | var dicTemplate = configDictionary[token];
|
| | | foreach (var value in dicTemplate.Values)
|
| | | {
|
| | | if (value != null && !value.parsed)
|
| | | {
|
| | | value.Parse();
|
| | | value.PostProcess();
|
| | | value.parsed = true;
|
| | | }
|
| | |
|
| | | configs.Add(value as T);
|
| | | }
|
| | |
|
| | |
| | | ReadFileFailure = 3,
|
| | | ParseFailure = 4,
|
| | | ParseSuccess = 5,
|
| | | }
|
| | |
|
| | | public enum AssetPath
|
| | | {
|
| | | Resource,
|
| | | ResourceOut,
|
| | | External,
|
| | | }
|
| | |
|
| | | private void OnApplicationOut()
|