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.
- package/dist/ExportCSPlugin.js +1 -1
- package/dist/ExportUnityCSJsonPlugin.d.ts +2 -1
- package/dist/ExportUnityCSJsonPlugin.d.ts.map +1 -1
- package/dist/ExportUnityCSJsonPlugin.js +48 -19
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/ExportCSPlugin.ts +1 -1
- package/src/ExportUnityCSJsonPlugin.ts +55 -15
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/test/dist/{/344/273/273/345/212/241/346/227/266/351/231/220.asset → SceneConfig-SceneConfig.asset} +2 -2
- package/test/dist/SceneConfig-SceneConfigLoader.cs +18 -0
- package/test/dist/{ExcelConfigJson.asset → SceneConfig-Sheet2.asset} +2 -2
- package/test/dist/SceneConfig-Sheet2.cs +1 -1
- package/test/dist/SceneConfig-Sheet2Loader.cs +18 -0
- package/test/dist/SceneConfig.cs +1 -1
- package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250.asset +15 -0
- package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250.cs +1 -1
- package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250Loader.cs +18 -0
- 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
- 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
- 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
- package/test/src//350/277/207/345/234/272/345/274/225/345/257/274.xlsx +0 -0
- package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-TaskConfig.cs +0 -135
- package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-TaskRewards.cs +0 -68
- package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-TaskTriggerConfig.cs +0 -145
- package/test/dist/EGBL/344/273/273/345/212/241/351/205/215/347/275/256-TimeLimit.cs +0 -55
- package/test/dist/Sheet2.asset +0 -15
- package/test/dist//344/273/273/345/212/241/345/210/227/350/241/250.asset +0 -15
- package/test/dist//344/273/273/345/212/241/345/245/226/345/212/261.asset +0 -15
- 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
- package/test/dist//345/257/271/350/257/235/350/241/250.asset +0 -15
package/dist/ExportCSPlugin.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HandleSheetParams, PluginBase } from "export-table-lib";
|
|
2
|
-
export declare function
|
|
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,
|
|
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.
|
|
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
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
let
|
|
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: ${
|
|
46
|
+
m_Name: ${fullName}
|
|
54
47
|
m_EditorClassIdentifier:
|
|
55
48
|
JsonText: ${JSON.stringify(jsonString)}
|
|
56
49
|
`;
|
|
57
50
|
return temp;
|
|
58
51
|
}
|
|
59
|
-
exports.
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
let
|
|
70
|
-
|
|
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: (
|
|
3
|
+
export declare const ExportPlugins: (ExportCSPlugin | ExportUJsonPlugin)[];
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
package/src/ExportCSPlugin.ts
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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: ${
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
|
|
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 恭喜你完成课程内容`\"}]"
|
|
@@ -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: EGBL任务配置-任务奖励
|
|
14
14
|
m_EditorClassIdentifier:
|
|
15
|
-
JsonText: "
|
|
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}]"
|
|
@@ -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: EGBL任务配置-任务时限
|
|
14
14
|
m_EditorClassIdentifier:
|
|
15
|
-
JsonText: "
|
|
15
|
+
JsonText: "[{\"id\":1001,\"duration\":24}]"
|
|
@@ -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}]"
|
|
@@ -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: "
|
|
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:
|
|
13
|
+
m_Name: SceneConfig-Sheet2
|
|
14
14
|
m_EditorClassIdentifier:
|
|
15
|
-
JsonText: "
|
|
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 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
|
+
}
|
package/test/dist/SceneConfig.cs
CHANGED