export-table-pulgin-csharp 1.0.45 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/ExportUnityCSJsonPlugin.d.ts +2 -1
  2. package/dist/ExportUnityCSJsonPlugin.d.ts.map +1 -1
  3. package/dist/ExportUnityCSJsonPlugin.js +19 -2
  4. package/package.json +1 -1
  5. package/src/ExportUnityCSJsonPlugin.ts +20 -2
  6. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/345/210/227/350/241/250.asset +0 -15
  7. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/345/210/227/350/241/250.cs +0 -226
  8. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/345/210/227/350/241/250Loader.cs +0 -26
  9. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/345/245/226/345/212/261.asset +0 -15
  10. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/345/245/226/345/212/261.cs +0 -115
  11. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/345/245/226/345/212/261Loader.cs +0 -26
  12. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/346/227/266/351/231/220.asset +0 -15
  13. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/346/227/266/351/231/220.cs +0 -88
  14. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/346/227/266/351/231/220Loader.cs +0 -26
  15. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/350/247/246/345/217/221/347/272/246/346/235/237/351/205/215/350/241/250.asset +0 -15
  16. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/350/247/246/345/217/221/347/272/246/346/235/237/351/205/215/350/241/250.cs +0 -291
  17. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-/344/273/273/345/212/241/350/247/246/345/217/221/347/272/246/346/235/237/351/205/215/350/241/250Loader.cs +0 -26
  18. package/test/dist/SceneConfig-SceneConfig.asset +0 -15
  19. package/test/dist/SceneConfig-SceneConfigLoader.cs +0 -26
  20. package/test/dist/SceneConfig-Sheet2.asset +0 -15
  21. package/test/dist/SceneConfig-Sheet2.cs +0 -112
  22. package/test/dist/SceneConfig-Sheet2Loader.cs +0 -26
  23. package/test/dist/SceneConfig.cs +0 -112
  24. package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250.asset +0 -15
  25. package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250.cs +0 -453
  26. package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250Loader.cs +0 -26
  27. package/test/dist//350/277/207/345/234/272/345/274/225/345/257/274-/350/277/207/345/234/272/345/274/225/345/257/274.asset +0 -15
  28. package/test/dist//350/277/207/345/234/272/345/274/225/345/257/274-/350/277/207/345/234/272/345/274/225/345/257/274.cs +0 -364
  29. package/test/dist//350/277/207/345/234/272/345/274/225/345/257/274-/350/277/207/345/234/272/345/274/225/345/257/274Loader.cs +0 -26
  30. package/test/src/EGBL/344/273/273/345/212/241/351/205/215/347/275/256.xlsx +0 -0
  31. package/test/src/SceneConfig.xlsx +0 -0
  32. package/test/src/~$/345/257/271/350/257/235/350/241/250.xlsx +0 -0
  33. package/test/src//345/257/271/350/257/235/350/241/250.xlsx +0 -0
  34. package/test/src//350/277/207/345/234/272/345/274/225/345/257/274.xlsx +0 -0
@@ -1,291 +0,0 @@
1
-
2
- using System.Collections.Generic;
3
- using System.Linq;
4
-
5
- namespace MEEC.ExportedConfigs{
6
- public partial class 任务触发约束配表 {
7
-
8
- public static List<任务触发约束配表> Configs = new List<任务触发约束配表>()
9
- {
10
- new 任务触发约束配表(1, 50000, false, "", 0, "", 0, "", 0, "任务时限", 1001),
11
- new 任务触发约束配表(2, 50010, true, "前置任务", 50000, "", 0, "", 0, "任务时限", 1001),
12
- new 任务触发约束配表(7, 50020, true, "前置任务", 50010, "", 0, "", 0, "任务时限", 1001),
13
- new 任务触发约束配表(8, 50030, true, "前置任务", 50020, "", 0, "", 0, "任务时限", 1001),
14
- new 任务触发约束配表(9, 50040, true, "前置任务", 50030, "", 0, "", 0, "任务时限", 1001),
15
- new 任务触发约束配表(10, 50050, true, "前置任务", 50040, "", 0, "", 0, "任务时限", 1001),
16
- };
17
-
18
- public 任务触发约束配表() { }
19
- public 任务触发约束配表(int id, double taskId, bool autoAccept, string cond1, double para1, string cond2, double para2, string cond3, double para3, string limit1, double limitPara1)
20
- {
21
- this.Id = id;
22
- this.TaskId = taskId;
23
- this.AutoAccept = autoAccept;
24
- this.Cond1 = cond1;
25
- this.Para1 = para1;
26
- this.Cond2 = cond2;
27
- this.Para2 = para2;
28
- this.Cond3 = cond3;
29
- this.Para3 = para3;
30
- this.Limit1 = limit1;
31
- this.LimitPara1 = limitPara1;
32
- }
33
-
34
- public virtual 任务触发约束配表 MergeFrom(任务触发约束配表 source)
35
- {
36
- this.Id = source.Id;
37
- this.TaskId = source.TaskId;
38
- this.AutoAccept = source.AutoAccept;
39
- this.Cond1 = source.Cond1;
40
- this.Para1 = source.Para1;
41
- this.Cond2 = source.Cond2;
42
- this.Para2 = source.Para2;
43
- this.Cond3 = source.Cond3;
44
- this.Para3 = source.Para3;
45
- this.Limit1 = source.Limit1;
46
- this.LimitPara1 = source.LimitPara1;
47
- return this;
48
- }
49
-
50
- public virtual 任务触发约束配表 Clone()
51
- {
52
- var config = new 任务触发约束配表();
53
- config.MergeFrom(this);
54
- return config;
55
- }
56
-
57
-
58
- /// <summary>
59
- /// id
60
- /// </summary>
61
- public int Id;
62
- /// <summary>
63
- /// 任务ID
64
- /// </summary>
65
- public double TaskId;
66
- /// <summary>
67
- /// 是否自动领取
68
- /// </summary>
69
- public bool AutoAccept;
70
- /// <summary>
71
- /// 条件1
72
- /// wilwin wilwin:
73
- /// q3wrjhqihruq
74
- /// ]qwklhqwlkqw
75
- /// qweklq
76
- /// </summary>
77
- public string Cond1;
78
- /// <summary>
79
- /// 条件1参数
80
- /// </summary>
81
- public double Para1;
82
- /// <summary>
83
- /// 条件2
84
- /// </summary>
85
- public string Cond2;
86
- /// <summary>
87
- /// 条件2参数
88
- /// </summary>
89
- public double Para2;
90
- /// <summary>
91
- /// 条件3
92
- /// </summary>
93
- public string Cond3;
94
- /// <summary>
95
- /// 条件3参数
96
- /// </summary>
97
- public double Para3;
98
- /// <summary>
99
- /// 约束1
100
- /// </summary>
101
- public string Limit1;
102
- /// <summary>
103
- /// 约束1参数
104
- /// </summary>
105
- public double LimitPara1;
106
-
107
-
108
- #region get字段
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
- #endregion
121
-
122
- #region uid map
123
- protected static Dictionary<int, 任务触发约束配表> _tempDictById;
124
- public static 任务触发约束配表 GetConfigById(int Id)
125
- {
126
- if (_tempDictById == null)
127
- {
128
- _tempDictById = new Dictionary<int, 任务触发约束配表>();
129
- Configs.ForEach(c =>
130
- {
131
- _tempDictById.Add(c.Id, c);
132
- });
133
- }
134
- return _tempDictById.GetValueOrDefault(Id);
135
- }
136
- protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByTaskId = new Dictionary<double, 任务触发约束配表[]>();
137
- public static 任务触发约束配表[] GetConfigsByTaskId(double TaskId)
138
- {
139
- if (_tempRecordsDictByTaskId.ContainsKey(TaskId))
140
- {
141
- return _tempRecordsDictByTaskId.GetValueOrDefault(TaskId);
142
- }
143
- else
144
- {
145
- var records = Configs.Where(c => c.TaskId == TaskId).ToArray();
146
- _tempRecordsDictByTaskId.Add(TaskId, records);
147
- return records;
148
- }
149
- }
150
-
151
- protected static Dictionary<string, 任务触发约束配表[]> _tempRecordsDictByCond1 = new Dictionary<string, 任务触发约束配表[]>();
152
- public static 任务触发约束配表[] GetConfigsByCond1(string Cond1)
153
- {
154
- if (_tempRecordsDictByCond1.ContainsKey(Cond1))
155
- {
156
- return _tempRecordsDictByCond1.GetValueOrDefault(Cond1);
157
- }
158
- else
159
- {
160
- var records = Configs.Where(c => c.Cond1 == Cond1).ToArray();
161
- _tempRecordsDictByCond1.Add(Cond1, records);
162
- return records;
163
- }
164
- }
165
- protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByPara1 = new Dictionary<double, 任务触发约束配表[]>();
166
- public static 任务触发约束配表[] GetConfigsByPara1(double Para1)
167
- {
168
- if (_tempRecordsDictByPara1.ContainsKey(Para1))
169
- {
170
- return _tempRecordsDictByPara1.GetValueOrDefault(Para1);
171
- }
172
- else
173
- {
174
- var records = Configs.Where(c => c.Para1 == Para1).ToArray();
175
- _tempRecordsDictByPara1.Add(Para1, records);
176
- return records;
177
- }
178
- }
179
- protected static Dictionary<string, 任务触发约束配表[]> _tempRecordsDictByCond2 = new Dictionary<string, 任务触发约束配表[]>();
180
- public static 任务触发约束配表[] GetConfigsByCond2(string Cond2)
181
- {
182
- if (_tempRecordsDictByCond2.ContainsKey(Cond2))
183
- {
184
- return _tempRecordsDictByCond2.GetValueOrDefault(Cond2);
185
- }
186
- else
187
- {
188
- var records = Configs.Where(c => c.Cond2 == Cond2).ToArray();
189
- _tempRecordsDictByCond2.Add(Cond2, records);
190
- return records;
191
- }
192
- }
193
- protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByPara2 = new Dictionary<double, 任务触发约束配表[]>();
194
- public static 任务触发约束配表[] GetConfigsByPara2(double Para2)
195
- {
196
- if (_tempRecordsDictByPara2.ContainsKey(Para2))
197
- {
198
- return _tempRecordsDictByPara2.GetValueOrDefault(Para2);
199
- }
200
- else
201
- {
202
- var records = Configs.Where(c => c.Para2 == Para2).ToArray();
203
- _tempRecordsDictByPara2.Add(Para2, records);
204
- return records;
205
- }
206
- }
207
- protected static Dictionary<string, 任务触发约束配表[]> _tempRecordsDictByCond3 = new Dictionary<string, 任务触发约束配表[]>();
208
- public static 任务触发约束配表[] GetConfigsByCond3(string Cond3)
209
- {
210
- if (_tempRecordsDictByCond3.ContainsKey(Cond3))
211
- {
212
- return _tempRecordsDictByCond3.GetValueOrDefault(Cond3);
213
- }
214
- else
215
- {
216
- var records = Configs.Where(c => c.Cond3 == Cond3).ToArray();
217
- _tempRecordsDictByCond3.Add(Cond3, records);
218
- return records;
219
- }
220
- }
221
- protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByPara3 = new Dictionary<double, 任务触发约束配表[]>();
222
- public static 任务触发约束配表[] GetConfigsByPara3(double Para3)
223
- {
224
- if (_tempRecordsDictByPara3.ContainsKey(Para3))
225
- {
226
- return _tempRecordsDictByPara3.GetValueOrDefault(Para3);
227
- }
228
- else
229
- {
230
- var records = Configs.Where(c => c.Para3 == Para3).ToArray();
231
- _tempRecordsDictByPara3.Add(Para3, records);
232
- return records;
233
- }
234
- }
235
- protected static Dictionary<string, 任务触发约束配表[]> _tempRecordsDictByLimit1 = new Dictionary<string, 任务触发约束配表[]>();
236
- public static 任务触发约束配表[] GetConfigsByLimit1(string Limit1)
237
- {
238
- if (_tempRecordsDictByLimit1.ContainsKey(Limit1))
239
- {
240
- return _tempRecordsDictByLimit1.GetValueOrDefault(Limit1);
241
- }
242
- else
243
- {
244
- var records = Configs.Where(c => c.Limit1 == Limit1).ToArray();
245
- _tempRecordsDictByLimit1.Add(Limit1, records);
246
- return records;
247
- }
248
- }
249
- protected static Dictionary<double, 任务触发约束配表[]> _tempRecordsDictByLimitPara1 = new Dictionary<double, 任务触发约束配表[]>();
250
- public static 任务触发约束配表[] GetConfigsByLimitPara1(double LimitPara1)
251
- {
252
- if (_tempRecordsDictByLimitPara1.ContainsKey(LimitPara1))
253
- {
254
- return _tempRecordsDictByLimitPara1.GetValueOrDefault(LimitPara1);
255
- }
256
- else
257
- {
258
- var records = Configs.Where(c => c.LimitPara1 == LimitPara1).ToArray();
259
- _tempRecordsDictByLimitPara1.Add(LimitPara1, records);
260
- return records;
261
- }
262
- }
263
-
264
- #endregion uid map
265
-
266
- #region 生成fk.get/set
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
- #endregion 生成fk.get/set
290
- }
291
- }
@@ -1,26 +0,0 @@
1
-
2
- using lang.json;
3
- using UnityEngine.AddressableAssets;
4
-
5
- namespace MEEC.ExportedConfigs
6
- {
7
- public partial class 任务触发约束配表
8
- {
9
- static 任务触发约束配表()
10
- {
11
- var loadUrl="Assets/Bundles/GameConfigs/Auto/EGBL任务配置-任务触发约束配表.asset";
12
- var configJson = Addressables.LoadAssetAsync<ExcelConfigJson>(loadUrl).WaitForCompletion();
13
- if (configJson != null)
14
- {
15
- var jsonObjs = JSON.parse<任务触发约束配表[]>(configJson.JsonText);
16
- var configs = 任务触发约束配表.Configs;
17
- configs.Clear();
18
- configs.AddRange(jsonObjs);
19
- }
20
- else
21
- {
22
- Debug.LogError($"配表资源缺失: {loadUrl}");
23
- }
24
- }
25
- }
26
- }
@@ -1,15 +0,0 @@
1
- %YAML 1.1
2
- %TAG !u! tag:unity3d.com,2011:
3
- --- !u!114 &11400000
4
- MonoBehaviour:
5
- m_ObjectHideFlags: 0
6
- m_CorrespondingSourceObject: {fileID: 0}
7
- m_PrefabInstance: {fileID: 0}
8
- m_PrefabAsset: {fileID: 0}
9
- m_GameObject: {fileID: 0}
10
- m_Enabled: 1
11
- m_EditorHideFlags: 0
12
- m_Script: {fileID: 11500000, guid: 496f60086c072a8479a6e0b948efb5e8, type: 3}
13
- m_Name: SceneConfig-SceneConfig
14
- m_EditorClassIdentifier:
15
- JsonText: "[{\"Uid\":1,\"SceneId\":\"第1章 格莫拉城\",\"OutingBaseGold\":1000},{\"Uid\":2,\"SceneId\":\"第2章 纳皮尔乐园\",\"OutingBaseGold\":1200}]"
@@ -1,26 +0,0 @@
1
-
2
- using lang.json;
3
- using UnityEngine.AddressableAssets;
4
-
5
- namespace MEEC.ExportedConfigs
6
- {
7
- public partial class SceneConfig
8
- {
9
- static SceneConfig()
10
- {
11
- var loadUrl="Assets/Bundles/GameConfigs/Auto/SceneConfig-SceneConfig.asset";
12
- var configJson = Addressables.LoadAssetAsync<ExcelConfigJson>(loadUrl).WaitForCompletion();
13
- if (configJson != null)
14
- {
15
- var jsonObjs = JSON.parse<SceneConfig[]>(configJson.JsonText);
16
- var configs = SceneConfig.Configs;
17
- configs.Clear();
18
- configs.AddRange(jsonObjs);
19
- }
20
- else
21
- {
22
- Debug.LogError($"配表资源缺失: {loadUrl}");
23
- }
24
- }
25
- }
26
- }
@@ -1,15 +0,0 @@
1
- %YAML 1.1
2
- %TAG !u! tag:unity3d.com,2011:
3
- --- !u!114 &11400000
4
- MonoBehaviour:
5
- m_ObjectHideFlags: 0
6
- m_CorrespondingSourceObject: {fileID: 0}
7
- m_PrefabInstance: {fileID: 0}
8
- m_PrefabAsset: {fileID: 0}
9
- m_GameObject: {fileID: 0}
10
- m_Enabled: 1
11
- m_EditorHideFlags: 0
12
- m_Script: {fileID: 11500000, guid: 496f60086c072a8479a6e0b948efb5e8, type: 3}
13
- m_Name: SceneConfig-Sheet2
14
- m_EditorClassIdentifier:
15
- JsonText: "[{\"Uid\":1,\"SceneId\":\"第1章 格莫拉城\",\"OutingBaseGold\":1000},{\"Uid\":2,\"SceneId\":\"第2章 纳皮尔乐园\",\"OutingBaseGold\":1200}]"
@@ -1,112 +0,0 @@
1
-
2
- using System.Collections.Generic;
3
- using System.Linq;
4
-
5
- namespace MEEC.ExportedConfigs{
6
- public partial class Sheet2 {
7
-
8
- public static List<Sheet2> Configs = new List<Sheet2>()
9
- {
10
- new Sheet2(1, "第1章 格莫拉城", 1000),
11
- new Sheet2(2, "第2章 纳皮尔乐园", 1200),
12
- };
13
-
14
- public Sheet2() { }
15
- public Sheet2(int uid, string sceneId, double outingBaseGold)
16
- {
17
- this.Uid = uid;
18
- this.SceneId = sceneId;
19
- this.OutingBaseGold = outingBaseGold;
20
- }
21
-
22
- public virtual Sheet2 MergeFrom(Sheet2 source)
23
- {
24
- this.Uid = source.Uid;
25
- this.SceneId = source.SceneId;
26
- this.OutingBaseGold = source.OutingBaseGold;
27
- return this;
28
- }
29
-
30
- public virtual Sheet2 Clone()
31
- {
32
- var config = new Sheet2();
33
- config.MergeFrom(this);
34
- return config;
35
- }
36
-
37
-
38
- /// <summary>
39
- /// uid
40
- /// </summary>
41
- public int Uid;
42
- /// <summary>
43
- /// 场景名
44
- /// </summary>
45
- public string SceneId;
46
- /// <summary>
47
- /// 出行基础金币收益
48
- /// </summary>
49
- public double OutingBaseGold;
50
-
51
-
52
- #region get字段
53
-
54
-
55
-
56
- #endregion
57
-
58
- #region uid map
59
- protected static Dictionary<int, Sheet2> _tempDictByUid;
60
- public static Sheet2 GetConfigByUid(int Uid)
61
- {
62
- if (_tempDictByUid == null)
63
- {
64
- _tempDictByUid = new Dictionary<int, Sheet2>();
65
- Configs.ForEach(c =>
66
- {
67
- _tempDictByUid.Add(c.Uid, c);
68
- });
69
- }
70
- return _tempDictByUid.GetValueOrDefault(Uid);
71
- }
72
- protected static Dictionary<string, Sheet2[]> _tempRecordsDictBySceneId = new Dictionary<string, Sheet2[]>();
73
- public static Sheet2[] GetConfigsBySceneId(string SceneId)
74
- {
75
- if (_tempRecordsDictBySceneId.ContainsKey(SceneId))
76
- {
77
- return _tempRecordsDictBySceneId.GetValueOrDefault(SceneId);
78
- }
79
- else
80
- {
81
- var records = Configs.Where(c => c.SceneId == SceneId).ToArray();
82
- _tempRecordsDictBySceneId.Add(SceneId, records);
83
- return records;
84
- }
85
- }
86
- protected static Dictionary<double, Sheet2[]> _tempRecordsDictByOutingBaseGold = new Dictionary<double, Sheet2[]>();
87
- public static Sheet2[] GetConfigsByOutingBaseGold(double OutingBaseGold)
88
- {
89
- if (_tempRecordsDictByOutingBaseGold.ContainsKey(OutingBaseGold))
90
- {
91
- return _tempRecordsDictByOutingBaseGold.GetValueOrDefault(OutingBaseGold);
92
- }
93
- else
94
- {
95
- var records = Configs.Where(c => c.OutingBaseGold == OutingBaseGold).ToArray();
96
- _tempRecordsDictByOutingBaseGold.Add(OutingBaseGold, records);
97
- return records;
98
- }
99
- }
100
-
101
- #endregion uid map
102
-
103
- #region 生成fk.get/set
104
-
105
-
106
-
107
-
108
-
109
-
110
- #endregion 生成fk.get/set
111
- }
112
- }
@@ -1,26 +0,0 @@
1
-
2
- using lang.json;
3
- using UnityEngine.AddressableAssets;
4
-
5
- namespace MEEC.ExportedConfigs
6
- {
7
- public partial class Sheet2
8
- {
9
- static Sheet2()
10
- {
11
- var loadUrl="Assets/Bundles/GameConfigs/Auto/SceneConfig-Sheet2.asset";
12
- var configJson = Addressables.LoadAssetAsync<ExcelConfigJson>(loadUrl).WaitForCompletion();
13
- if (configJson != null)
14
- {
15
- var jsonObjs = JSON.parse<Sheet2[]>(configJson.JsonText);
16
- var configs = Sheet2.Configs;
17
- configs.Clear();
18
- configs.AddRange(jsonObjs);
19
- }
20
- else
21
- {
22
- Debug.LogError($"配表资源缺失: {loadUrl}");
23
- }
24
- }
25
- }
26
- }
@@ -1,112 +0,0 @@
1
-
2
- using System.Collections.Generic;
3
- using System.Linq;
4
-
5
- namespace MEEC.ExportedConfigs{
6
- public partial class SceneConfig {
7
-
8
- public static List<SceneConfig> Configs = new List<SceneConfig>()
9
- {
10
- new SceneConfig(1, "第1章 格莫拉城", 1000),
11
- new SceneConfig(2, "第2章 纳皮尔乐园", 1200),
12
- };
13
-
14
- public SceneConfig() { }
15
- public SceneConfig(int uid, string sceneId, double outingBaseGold)
16
- {
17
- this.Uid = uid;
18
- this.SceneId = sceneId;
19
- this.OutingBaseGold = outingBaseGold;
20
- }
21
-
22
- public virtual SceneConfig MergeFrom(SceneConfig source)
23
- {
24
- this.Uid = source.Uid;
25
- this.SceneId = source.SceneId;
26
- this.OutingBaseGold = source.OutingBaseGold;
27
- return this;
28
- }
29
-
30
- public virtual SceneConfig Clone()
31
- {
32
- var config = new SceneConfig();
33
- config.MergeFrom(this);
34
- return config;
35
- }
36
-
37
-
38
- /// <summary>
39
- /// uid
40
- /// </summary>
41
- public int Uid;
42
- /// <summary>
43
- /// 场景名
44
- /// </summary>
45
- public string SceneId;
46
- /// <summary>
47
- /// 出行基础金币收益
48
- /// </summary>
49
- public double OutingBaseGold;
50
-
51
-
52
- #region get字段
53
-
54
-
55
-
56
- #endregion
57
-
58
- #region uid map
59
- protected static Dictionary<int, SceneConfig> _tempDictByUid;
60
- public static SceneConfig GetConfigByUid(int Uid)
61
- {
62
- if (_tempDictByUid == null)
63
- {
64
- _tempDictByUid = new Dictionary<int, SceneConfig>();
65
- Configs.ForEach(c =>
66
- {
67
- _tempDictByUid.Add(c.Uid, c);
68
- });
69
- }
70
- return _tempDictByUid.GetValueOrDefault(Uid);
71
- }
72
- protected static Dictionary<string, SceneConfig[]> _tempRecordsDictBySceneId = new Dictionary<string, SceneConfig[]>();
73
- public static SceneConfig[] GetConfigsBySceneId(string SceneId)
74
- {
75
- if (_tempRecordsDictBySceneId.ContainsKey(SceneId))
76
- {
77
- return _tempRecordsDictBySceneId.GetValueOrDefault(SceneId);
78
- }
79
- else
80
- {
81
- var records = Configs.Where(c => c.SceneId == SceneId).ToArray();
82
- _tempRecordsDictBySceneId.Add(SceneId, records);
83
- return records;
84
- }
85
- }
86
- protected static Dictionary<double, SceneConfig[]> _tempRecordsDictByOutingBaseGold = new Dictionary<double, SceneConfig[]>();
87
- public static SceneConfig[] GetConfigsByOutingBaseGold(double OutingBaseGold)
88
- {
89
- if (_tempRecordsDictByOutingBaseGold.ContainsKey(OutingBaseGold))
90
- {
91
- return _tempRecordsDictByOutingBaseGold.GetValueOrDefault(OutingBaseGold);
92
- }
93
- else
94
- {
95
- var records = Configs.Where(c => c.OutingBaseGold == OutingBaseGold).ToArray();
96
- _tempRecordsDictByOutingBaseGold.Add(OutingBaseGold, records);
97
- return records;
98
- }
99
- }
100
-
101
- #endregion uid map
102
-
103
- #region 生成fk.get/set
104
-
105
-
106
-
107
-
108
-
109
-
110
- #endregion 生成fk.get/set
111
- }
112
- }