export-table-pulgin-csharp 1.0.34 → 1.0.37

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 (42) hide show
  1. package/dist/ExportCSPlugin.js +1 -1
  2. package/dist/ExportUnityCSJsonPlugin.d.ts +2 -1
  3. package/dist/ExportUnityCSJsonPlugin.d.ts.map +1 -1
  4. package/dist/ExportUnityCSJsonPlugin.js +48 -19
  5. package/dist/index.d.ts +1 -1
  6. package/package.json +1 -1
  7. package/src/ExportCSPlugin.ts +1 -1
  8. package/src/ExportUnityCSJsonPlugin.ts +55 -15
  9. 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 +15 -0
  10. 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 +1 -1
  11. 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 +18 -0
  12. package/test/dist/{SceneConfig.asset → 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} +2 -2
  13. 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 +1 -1
  14. 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 +18 -0
  15. package/test/dist/{ExcelConfigJson 1.asset → 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} +2 -2
  16. 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 +1 -1
  17. 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 +18 -0
  18. 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 +15 -0
  19. 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 +1 -1
  20. 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 +18 -0
  21. package/test/dist/{/344/273/273/345/212/241/346/227/266/351/231/220.asset → SceneConfig-SceneConfig.asset} +2 -2
  22. package/test/dist/SceneConfig-SceneConfigLoader.cs +18 -0
  23. package/test/dist/{ExcelConfigJson.asset → SceneConfig-Sheet2.asset} +2 -2
  24. package/test/dist/SceneConfig-Sheet2.cs +1 -1
  25. package/test/dist/SceneConfig-Sheet2Loader.cs +18 -0
  26. package/test/dist/SceneConfig.cs +1 -1
  27. package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250.asset +15 -0
  28. package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250.cs +1 -1
  29. package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250Loader.cs +18 -0
  30. 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 +15 -0
  31. 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 +364 -0
  32. 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 +18 -0
  33. package/test/src//350/277/207/345/234/272/345/274/225/345/257/274.xlsx +0 -0
  34. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-TaskConfig.cs +0 -135
  35. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-TaskRewards.cs +0 -68
  36. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-TaskTriggerConfig.cs +0 -145
  37. package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-TimeLimit.cs +0 -55
  38. package/test/dist/Sheet2.asset +0 -15
  39. package/test/dist//344/273/273/345/212/241/345/210/227/350/241/250.asset +0 -15
  40. package/test/dist//344/273/273/345/212/241/345/245/226/345/212/261.asset +0 -15
  41. package/test/dist//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
  42. package/test/dist//345/257/271/350/257/235/350/241/250.asset +0 -15
@@ -152,7 +152,7 @@ using System.Collections.Generic;
152
152
  using System.Linq;
153
153
 
154
154
  namespace MEEC.ExportedConfigs{
155
- public class ${RowClass} {
155
+ public partial class ${RowClass} {
156
156
 
157
157
  public static List<${RowClass}> Configs = new List<${RowClass}>()
158
158
  {
@@ -1,5 +1,6 @@
1
1
  import { HandleSheetParams, PluginBase } from "export-table-lib";
2
- export declare function export_stuff(paras: HandleSheetParams): string | null;
2
+ export declare function exportUJson(paras: HandleSheetParams): string | null;
3
+ export declare function exportUJsonLoader(paras: HandleSheetParams): string | null;
3
4
  export declare class ExportUJsonPlugin extends PluginBase {
4
5
  name: string;
5
6
  tags: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"ExportUnityCSJsonPlugin.d.ts","sourceRoot":"","sources":["../src/ExportUnityCSJsonPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAkC,MAAM,kBAAkB,CAAA;AAGlI,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAmCpE;AAED,qBAAa,iBAAkB,SAAQ,UAAU;IAChD,IAAI,SAAU;IACd,IAAI,EAAE,MAAM,EAAE,CAAY;IAE1B,WAAW,CAAC,KAAK,EAAE,iBAAiB;CAQpC"}
1
+ {"version":3,"file":"ExportUnityCSJsonPlugin.d.ts","sourceRoot":"","sources":["../src/ExportUnityCSJsonPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAkC,MAAM,kBAAkB,CAAA;AAGlI,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CA+BnE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAgCzE;AAED,qBAAa,iBAAkB,SAAQ,UAAU;IAChD,IAAI,SAAU;IACd,IAAI,EAAE,MAAM,EAAE,CAAY;IAE1B,WAAW,CAAC,KAAK,EAAE,iBAAiB;CAkBpC"}
@@ -23,20 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ExportUJsonPlugin = exports.export_stuff = void 0;
26
+ exports.ExportUJsonPlugin = exports.exportUJsonLoader = exports.exportUJson = void 0;
27
27
  const export_table_lib_1 = require("export-table-lib");
28
28
  const fs = __importStar(require("fs-extra"));
29
- function export_stuff(paras) {
30
- var _a;
31
- let { datas, fields, name, objects, } = paras;
32
- let mainField = (_a = fields.find(f => f.type == "uid")) !== null && _a !== void 0 ? _a : fields[0];
33
- let jsonString = `
34
- {
35
- ${(0, export_table_lib_1.foreach)(objects, obj => `
36
- "${obj[mainField.name]}" : ${JSON.stringify(obj)}
37
- `, ",\n")}
38
- }
39
- `;
29
+ function exportUJson(paras) {
30
+ let { datas, fields, name, objects, table, } = paras;
31
+ var fullName = `${table.workbookName}-${name}`;
32
+ let jsonString = JSON.stringify(objects);
40
33
  // !!!必须开头没有空格
41
34
  let temp = `%YAML 1.1
42
35
  %TAG !u! tag:unity3d.com,2011:
@@ -50,13 +43,39 @@ MonoBehaviour:
50
43
  m_Enabled: 1
51
44
  m_EditorHideFlags: 0
52
45
  m_Script: {fileID: 11500000, guid: 496f60086c072a8479a6e0b948efb5e8, type: 3}
53
- m_Name: ${name}
46
+ m_Name: ${fullName}
54
47
  m_EditorClassIdentifier:
55
48
  JsonText: ${JSON.stringify(jsonString)}
56
49
  `;
57
50
  return temp;
58
51
  }
59
- exports.export_stuff = export_stuff;
52
+ exports.exportUJson = exportUJson;
53
+ function exportUJsonLoader(paras) {
54
+ let { datas, fields, name, objects, table, } = paras;
55
+ var fullName = `${table.workbookName}-${name}`;
56
+ // !!!必须开头没有空格
57
+ let temp = `
58
+ using lang.json;
59
+ using UnityEngine.AddressableAssets;
60
+
61
+ namespace MEEC.ExportedConfigs
62
+ {
63
+ public partial class ${name}
64
+ {
65
+ static ${name}()
66
+ {
67
+ var configJson = Addressables.LoadAssetAsync<ExcelConfigJson>("Assets/Bundles/GameConfig/Auto/${fullName}.asset").WaitForCompletion();
68
+ var jsonObjs = JSON.parse<${name}[]>(configJson.JsonText);
69
+ var configs = ${name}.Configs;
70
+ configs.Clear();
71
+ configs.AddRange(jsonObjs);
72
+ }
73
+ }
74
+ }
75
+ `;
76
+ return temp;
77
+ }
78
+ exports.exportUJsonLoader = exportUJsonLoader;
60
79
  class ExportUJsonPlugin extends export_table_lib_1.PluginBase {
61
80
  constructor() {
62
81
  super(...arguments);
@@ -64,12 +83,22 @@ class ExportUJsonPlugin extends export_table_lib_1.PluginBase {
64
83
  this.tags = ["ujson"];
65
84
  }
66
85
  handleSheet(paras) {
67
- let content = export_stuff(paras);
68
- if (content != null) {
69
- let savePath = new export_table_lib_1.OutFilePath(paras.outPath, paras.table.name, ".asset").fullPath;
70
- fs.outputFileSync(savePath, content, "utf-8");
86
+ var fullName = `${paras.table.workbookName}-${paras.name}`;
87
+ {
88
+ let content1 = exportUJsonLoader(paras);
89
+ if (content1 != null) {
90
+ let savePath = new export_table_lib_1.OutFilePath(paras.outPath, fullName, "Loader.cs").fullPath;
91
+ fs.outputFileSync(savePath, content1, "utf-8");
92
+ }
93
+ }
94
+ {
95
+ let content2 = exportUJson(paras);
96
+ if (content2 != null) {
97
+ let savePath = new export_table_lib_1.OutFilePath(paras.outPath, fullName, ".asset").fullPath;
98
+ fs.outputFileSync(savePath, content2, "utf-8");
99
+ }
100
+ return content2;
71
101
  }
72
- return content;
73
102
  }
74
103
  }
75
104
  exports.ExportUJsonPlugin = ExportUJsonPlugin;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { ExportPlugin as ExportCSPlugin } from "./ExportCSPlugin";
2
2
  import { ExportUJsonPlugin } from "./ExportUnityCSJsonPlugin";
3
- export declare const ExportPlugins: (ExportUJsonPlugin | ExportCSPlugin)[];
3
+ export declare const ExportPlugins: (ExportCSPlugin | ExportUJsonPlugin)[];
4
4
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "export-table-pulgin-csharp",
3
- "version": "1.0.34",
3
+ "version": "1.0.37",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -121,7 +121,7 @@ using System.Collections.Generic;
121
121
  using System.Linq;
122
122
 
123
123
  namespace MEEC.ExportedConfigs{
124
- public class ${RowClass} {
124
+ public partial class ${RowClass} {
125
125
 
126
126
  public static List<${RowClass}> Configs = new List<${RowClass}>()
127
127
  {
@@ -2,22 +2,18 @@
2
2
  import { cmm, HandleSheetParams, Field, foreach, IPlugin, st, PluginBase, HandleBatchParams, OutFilePath } from "export-table-lib"
3
3
  import * as fs from "fs-extra"
4
4
 
5
- export function export_stuff(paras: HandleSheetParams): string | null {
5
+ export function exportUJson(paras: HandleSheetParams): string | null {
6
6
  let {
7
7
  datas,
8
8
  fields,
9
9
  name,
10
10
  objects,
11
+ table,
11
12
  } = paras;
12
13
 
13
- let mainField: Field = fields.find(f => f.type == "uid") ?? fields[0]
14
- let jsonString = `
15
- {
16
- ${foreach(objects, obj => `
17
- "${obj[mainField.name]}" : ${JSON.stringify(obj)}
18
- `, ",\n")}
19
- }
20
- `
14
+ var fullName = `${table.workbookName}-${name}`
15
+ let jsonString = JSON.stringify(objects);
16
+
21
17
  // !!!必须开头没有空格
22
18
  let temp = `%YAML 1.1
23
19
  %TAG !u! tag:unity3d.com,2011:
@@ -31,7 +27,7 @@ MonoBehaviour:
31
27
  m_Enabled: 1
32
28
  m_EditorHideFlags: 0
33
29
  m_Script: {fileID: 11500000, guid: 496f60086c072a8479a6e0b948efb5e8, type: 3}
34
- m_Name: ${name}
30
+ m_Name: ${fullName}
35
31
  m_EditorClassIdentifier:
36
32
  JsonText: ${JSON.stringify(jsonString)}
37
33
  `
@@ -39,16 +35,60 @@ MonoBehaviour:
39
35
 
40
36
  }
41
37
 
38
+ export function exportUJsonLoader(paras: HandleSheetParams): string | null {
39
+ let {
40
+ datas,
41
+ fields,
42
+ name,
43
+ objects,
44
+ table,
45
+ } = paras;
46
+
47
+ var fullName = `${table.workbookName}-${name}`
48
+ // !!!必须开头没有空格
49
+ let temp = `
50
+ using lang.json;
51
+ using UnityEngine.AddressableAssets;
52
+
53
+ namespace MEEC.ExportedConfigs
54
+ {
55
+ public partial class ${name}
56
+ {
57
+ static ${name}()
58
+ {
59
+ var configJson = Addressables.LoadAssetAsync<ExcelConfigJson>("Assets/Bundles/GameConfig/Auto/${fullName}.asset").WaitForCompletion();
60
+ var jsonObjs = JSON.parse<${name}[]>(configJson.JsonText);
61
+ var configs = ${name}.Configs;
62
+ configs.Clear();
63
+ configs.AddRange(jsonObjs);
64
+ }
65
+ }
66
+ }
67
+ `
68
+ return temp
69
+
70
+ }
71
+
42
72
  export class ExportUJsonPlugin extends PluginBase {
43
73
  name = "ujson"
44
74
  tags: string[] = ["ujson"]
45
75
 
46
76
  handleSheet(paras: HandleSheetParams) {
47
- let content = export_stuff(paras)
48
- if (content != null) {
49
- let savePath = new OutFilePath(paras.outPath, paras.table.name, ".asset").fullPath
50
- fs.outputFileSync(savePath, content, "utf-8")
77
+ var fullName = `${paras.table.workbookName}-${paras.name}`
78
+ {
79
+ let content1 = exportUJsonLoader(paras)
80
+ if (content1 != null) {
81
+ let savePath = new OutFilePath(paras.outPath, fullName, "Loader.cs").fullPath
82
+ fs.outputFileSync(savePath, content1, "utf-8")
83
+ }
84
+ }
85
+ {
86
+ let content2 = exportUJson(paras)
87
+ if (content2 != null) {
88
+ let savePath = new OutFilePath(paras.outPath, fullName, ".asset").fullPath
89
+ fs.outputFileSync(savePath, content2, "utf-8")
90
+ }
91
+ return content2
51
92
  }
52
- return content
53
93
  }
54
94
  }
@@ -0,0 +1,15 @@
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: EGBL任务配置-任务列表
14
+ m_EditorClassIdentifier:
15
+ JsonText: "[{\"id\":50000,\"name\":\"口腔\",\"subTasks\":[],\"taskRewards\":[],\"任务类型\":\"\",\"任务标签\":\"\",\"startCmds\":\"`/tp @e[type=npc,c=1,tag=消化NPC] 24 47 -171`\",\"succeedCmds\":\"\"},{\"id\":50010,\"name\":\"食道和胃\",\"subTasks\":[],\"taskRewards\":[],\"任务类型\":\"\",\"任务标签\":\"\",\"startCmds\":\"\",\"succeedCmds\":\"`/title @p title 恭喜你完成口腔关卡`,`/give @p myitem:xhdlxj_modle_kouqiang`\"},{\"id\":50020,\"name\":\"小肠\",\"subTasks\":[],\"taskRewards\":[],\"任务类型\":\"\",\"任务标签\":\"\",\"startCmds\":\"\",\"succeedCmds\":\"`/title @p title 恭喜你完成食道&胃关卡`,`/give @p myitem:xhdlxj_modle_shiguan`,`/give @p myitem:xhdlxj_modle_wei`\"},{\"id\":50030,\"name\":\"大肠\",\"subTasks\":[],\"taskRewards\":[],\"任务类型\":\"\",\"任务标签\":\"\",\"startCmds\":\"\",\"succeedCmds\":\"`/title @p title 恭喜你完成小肠关卡`\"},{\"id\":50040,\"name\":\"消化拼图\",\"subTasks\":[],\"taskRewards\":[],\"任务类型\":\"\",\"任务标签\":\"\",\"startCmds\":\"\",\"succeedCmds\":\"`/title @p title 恭喜你完成大肠关卡`,`/give @p myitem:xhdlxj_modle_xiaochang`,`/give @p myitem:xhdlxj_modle_dachang`\"},{\"id\":50050,\"name\":\"恭喜完成\",\"subTasks\":[],\"taskRewards\":[],\"任务类型\":\"\",\"任务标签\":\"\",\"startCmds\":\"\",\"succeedCmds\":\"`/title @p title 恭喜你完成课程内容`\"}]"
@@ -3,7 +3,7 @@ using System.Collections.Generic;
3
3
  using System.Linq;
4
4
 
5
5
  namespace MEEC.ExportedConfigs{
6
- public class 任务列表 {
6
+ public partial class 任务列表 {
7
7
 
8
8
  public static List<任务列表> Configs = new List<任务列表>()
9
9
  {
@@ -0,0 +1,18 @@
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 configJson = Addressables.LoadAssetAsync<ExcelConfigJson>("Assets/Bundles/GameConfig/Auto/EGBL任务配置-任务列表.asset").WaitForCompletion();
12
+ var jsonObjs = JSON.parse<任务列表[]>(configJson.JsonText);
13
+ var configs = 任务列表.Configs;
14
+ configs.Clear();
15
+ configs.AddRange(jsonObjs);
16
+ }
17
+ }
18
+ }
@@ -10,6 +10,6 @@ MonoBehaviour:
10
10
  m_Enabled: 1
11
11
  m_EditorHideFlags: 0
12
12
  m_Script: {fileID: 11500000, guid: 496f60086c072a8479a6e0b948efb5e8, type: 3}
13
- m_Name: SceneConfig
13
+ m_Name: EGBL任务配置-任务奖励
14
14
  m_EditorClassIdentifier:
15
- JsonText: "\n{\n \"1\" : {\"uid\":1,\"sceneId\":\"第1章 格莫拉城\",\"outingBaseGold\":1000},\n \"2\" : {\"uid\":2,\"sceneId\":\"第2章 纳皮尔乐园\",\"outingBaseGold\":1200}\n}\n"
15
+ JsonText: "[{\"id\":1001,\"props1\":\"apple\",\"count1\":1},{\"id\":1002,\"props1\":\"apple\",\"count1\":1},{\"id\":1003,\"props1\":\"apple\",\"count1\":1},{\"id\":1004,\"props1\":\"apple\",\"count1\":1},{\"id\":1005,\"props1\":\"apple\",\"count1\":1}]"
@@ -3,7 +3,7 @@ using System.Collections.Generic;
3
3
  using System.Linq;
4
4
 
5
5
  namespace MEEC.ExportedConfigs{
6
- public class 任务奖励 {
6
+ public partial class 任务奖励 {
7
7
 
8
8
  public static List<任务奖励> Configs = new List<任务奖励>()
9
9
  {
@@ -0,0 +1,18 @@
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 configJson = Addressables.LoadAssetAsync<ExcelConfigJson>("Assets/Bundles/GameConfig/Auto/EGBL任务配置-任务奖励.asset").WaitForCompletion();
12
+ var jsonObjs = JSON.parse<任务奖励[]>(configJson.JsonText);
13
+ var configs = 任务奖励.Configs;
14
+ configs.Clear();
15
+ configs.AddRange(jsonObjs);
16
+ }
17
+ }
18
+ }
@@ -10,6 +10,6 @@ MonoBehaviour:
10
10
  m_Enabled: 1
11
11
  m_EditorHideFlags: 0
12
12
  m_Script: {fileID: 11500000, guid: 496f60086c072a8479a6e0b948efb5e8, type: 3}
13
- m_Name: ExcelConfigJson 1
13
+ m_Name: EGBL任务配置-任务时限
14
14
  m_EditorClassIdentifier:
15
- JsonText: "we\n \n \"''AA"
15
+ JsonText: "[{\"id\":1001,\"duration\":24}]"
@@ -3,7 +3,7 @@ using System.Collections.Generic;
3
3
  using System.Linq;
4
4
 
5
5
  namespace MEEC.ExportedConfigs{
6
- public class 任务时限 {
6
+ public partial class 任务时限 {
7
7
 
8
8
  public static List<任务时限> Configs = new List<任务时限>()
9
9
  {
@@ -0,0 +1,18 @@
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 configJson = Addressables.LoadAssetAsync<ExcelConfigJson>("Assets/Bundles/GameConfig/Auto/EGBL任务配置-任务时限.asset").WaitForCompletion();
12
+ var jsonObjs = JSON.parse<任务时限[]>(configJson.JsonText);
13
+ var configs = 任务时限.Configs;
14
+ configs.Clear();
15
+ configs.AddRange(jsonObjs);
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,15 @@
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: EGBL任务配置-任务触发约束配表
14
+ m_EditorClassIdentifier:
15
+ JsonText: "[{\"id\":1,\"taskId\":50000,\"autoAccept\":false,\"cond1\":\"\",\"para1\":0,\"cond2\":\"\",\"para2\":0,\"cond3\":\"\",\"para3\":0,\"limit1\":\"任务时限\",\"limitPara1\":1001},{\"id\":2,\"taskId\":50010,\"autoAccept\":true,\"cond1\":\"前置任务\",\"para1\":50000,\"cond2\":\"\",\"para2\":0,\"cond3\":\"\",\"para3\":0,\"limit1\":\"任务时限\",\"limitPara1\":1001},{\"id\":7,\"taskId\":50020,\"autoAccept\":true,\"cond1\":\"前置任务\",\"para1\":50010,\"cond2\":\"\",\"para2\":0,\"cond3\":\"\",\"para3\":0,\"limit1\":\"任务时限\",\"limitPara1\":1001},{\"id\":8,\"taskId\":50030,\"autoAccept\":true,\"cond1\":\"前置任务\",\"para1\":50020,\"cond2\":\"\",\"para2\":0,\"cond3\":\"\",\"para3\":0,\"limit1\":\"任务时限\",\"limitPara1\":1001},{\"id\":9,\"taskId\":50040,\"autoAccept\":true,\"cond1\":\"前置任务\",\"para1\":50030,\"cond2\":\"\",\"para2\":0,\"cond3\":\"\",\"para3\":0,\"limit1\":\"任务时限\",\"limitPara1\":1001},{\"id\":10,\"taskId\":50050,\"autoAccept\":true,\"cond1\":\"前置任务\",\"para1\":50040,\"cond2\":\"\",\"para2\":0,\"cond3\":\"\",\"para3\":0,\"limit1\":\"任务时限\",\"limitPara1\":1001}]"
@@ -3,7 +3,7 @@ using System.Collections.Generic;
3
3
  using System.Linq;
4
4
 
5
5
  namespace MEEC.ExportedConfigs{
6
- public class 任务触发约束配表 {
6
+ public partial class 任务触发约束配表 {
7
7
 
8
8
  public static List<任务触发约束配表> Configs = new List<任务触发约束配表>()
9
9
  {
@@ -0,0 +1,18 @@
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 configJson = Addressables.LoadAssetAsync<ExcelConfigJson>("Assets/Bundles/GameConfig/Auto/EGBL任务配置-任务触发约束配表.asset").WaitForCompletion();
12
+ var jsonObjs = JSON.parse<任务触发约束配表[]>(configJson.JsonText);
13
+ var configs = 任务触发约束配表.Configs;
14
+ configs.Clear();
15
+ configs.AddRange(jsonObjs);
16
+ }
17
+ }
18
+ }
@@ -10,6 +10,6 @@ MonoBehaviour:
10
10
  m_Enabled: 1
11
11
  m_EditorHideFlags: 0
12
12
  m_Script: {fileID: 11500000, guid: 496f60086c072a8479a6e0b948efb5e8, type: 3}
13
- m_Name: 任务时限
13
+ m_Name: SceneConfig-SceneConfig
14
14
  m_EditorClassIdentifier:
15
- JsonText: "\n{\n \"1001\" : {\"id\":1001,\"duration\":24}\n}\n"
15
+ JsonText: "[{\"uid\":1,\"sceneId\":\"第1章 格莫拉城\",\"outingBaseGold\":1000},{\"uid\":2,\"sceneId\":\"第2章 纳皮尔乐园\",\"outingBaseGold\":1200}]"
@@ -0,0 +1,18 @@
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 configJson = Addressables.LoadAssetAsync<ExcelConfigJson>("Assets/Bundles/GameConfig/Auto/SceneConfig-SceneConfig.asset").WaitForCompletion();
12
+ var jsonObjs = JSON.parse<SceneConfig[]>(configJson.JsonText);
13
+ var configs = SceneConfig.Configs;
14
+ configs.Clear();
15
+ configs.AddRange(jsonObjs);
16
+ }
17
+ }
18
+ }
@@ -10,6 +10,6 @@ MonoBehaviour:
10
10
  m_Enabled: 1
11
11
  m_EditorHideFlags: 0
12
12
  m_Script: {fileID: 11500000, guid: 496f60086c072a8479a6e0b948efb5e8, type: 3}
13
- m_Name: ExcelConfigJson
13
+ m_Name: SceneConfig-Sheet2
14
14
  m_EditorClassIdentifier:
15
- JsonText: "we\n \n \"''AA"
15
+ JsonText: "[{\"uid\":1,\"sceneId\":\"第1章 格莫拉城\",\"outingBaseGold\":1000},{\"uid\":2,\"sceneId\":\"第2章 纳皮尔乐园\",\"outingBaseGold\":1200}]"
@@ -3,7 +3,7 @@ using System.Collections.Generic;
3
3
  using System.Linq;
4
4
 
5
5
  namespace MEEC.ExportedConfigs{
6
- public class Sheet2 {
6
+ public partial class Sheet2 {
7
7
 
8
8
  public static List<Sheet2> Configs = new List<Sheet2>()
9
9
  {
@@ -0,0 +1,18 @@
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 configJson = Addressables.LoadAssetAsync<ExcelConfigJson>("Assets/Bundles/GameConfig/Auto/SceneConfig-Sheet2.asset").WaitForCompletion();
12
+ var jsonObjs = JSON.parse<Sheet2[]>(configJson.JsonText);
13
+ var configs = Sheet2.Configs;
14
+ configs.Clear();
15
+ configs.AddRange(jsonObjs);
16
+ }
17
+ }
18
+ }
@@ -3,7 +3,7 @@ using System.Collections.Generic;
3
3
  using System.Linq;
4
4
 
5
5
  namespace MEEC.ExportedConfigs{
6
- public class SceneConfig {
6
+ public partial class SceneConfig {
7
7
 
8
8
  public static List<SceneConfig> Configs = new List<SceneConfig>()
9
9
  {