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.
- package/dist/ExportUnityCSJsonPlugin.d.ts +2 -1
- package/dist/ExportUnityCSJsonPlugin.d.ts.map +1 -1
- package/dist/ExportUnityCSJsonPlugin.js +19 -2
- package/package.json +1 -1
- package/src/ExportUnityCSJsonPlugin.ts +20 -2
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/test/dist/SceneConfig-SceneConfig.asset +0 -15
- package/test/dist/SceneConfig-SceneConfigLoader.cs +0 -26
- package/test/dist/SceneConfig-Sheet2.asset +0 -15
- package/test/dist/SceneConfig-Sheet2.cs +0 -112
- package/test/dist/SceneConfig-Sheet2Loader.cs +0 -26
- package/test/dist/SceneConfig.cs +0 -112
- package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250.asset +0 -15
- package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250.cs +0 -453
- package/test/dist//345/257/271/350/257/235/350/241/250-/345/257/271/350/257/235/350/241/250Loader.cs +0 -26
- 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
- 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
- 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
- package/test/src/EGBL/344/273/273/345/212/241/351/205/215/347/275/256.xlsx +0 -0
- package/test/src/SceneConfig.xlsx +0 -0
- package/test/src/~$/345/257/271/350/257/235/350/241/250.xlsx +0 -0
- package/test/src//345/257/271/350/257/235/350/241/250.xlsx +0 -0
- package/test/src//350/277/207/345/234/272/345/274/225/345/257/274.xlsx +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { HandleSheetParams, PluginBase } from "export-table-lib";
|
|
1
|
+
import { HandleSheetParams, PluginBase, HandleBatchParams } from "export-table-lib";
|
|
2
2
|
export declare function exportUJson(paras: HandleSheetParams): string | null;
|
|
3
3
|
export declare function exportUJsonLoader(paras: HandleSheetParams): string | null;
|
|
4
4
|
export declare class ExportUJsonPlugin extends PluginBase {
|
|
5
5
|
name: string;
|
|
6
6
|
tags: string[];
|
|
7
7
|
handleSheet(paras: HandleSheetParams): string | null;
|
|
8
|
+
handleBatch(paras: HandleBatchParams): void;
|
|
8
9
|
}
|
|
9
10
|
//# sourceMappingURL=ExportUnityCSJsonPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportUnityCSJsonPlugin.d.ts","sourceRoot":"","sources":["../src/ExportUnityCSJsonPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,
|
|
1
|
+
{"version":3,"file":"ExportUnityCSJsonPlugin.d.ts","sourceRoot":"","sources":["../src/ExportUnityCSJsonPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAE,iBAAiB,EAAe,MAAM,kBAAkB,CAAA;AAGlI,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAgDnE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAwCzE;AAED,qBAAa,iBAAkB,SAAQ,UAAU;IAChD,IAAI,SAAU;IACd,IAAI,EAAE,MAAM,EAAE,CAAY;IAE1B,WAAW,CAAC,KAAK,EAAE,iBAAiB;IAmBpC,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;CAiB3C"}
|
|
@@ -78,10 +78,10 @@ namespace MEEC.ExportedConfigs
|
|
|
78
78
|
{
|
|
79
79
|
public partial class ${name}
|
|
80
80
|
{
|
|
81
|
-
static
|
|
81
|
+
public static async Task Load()
|
|
82
82
|
{
|
|
83
83
|
var loadUrl="Assets/Bundles/GameConfigs/Auto/${fullName}.asset";
|
|
84
|
-
var configJson = Addressables.LoadAssetAsync<ExcelConfigJson>(loadUrl).
|
|
84
|
+
var configJson = await Addressables.LoadAssetAsync<ExcelConfigJson>(loadUrl).Task;
|
|
85
85
|
if (configJson != null)
|
|
86
86
|
{
|
|
87
87
|
var jsonObjs = JSON.parse<${name}[]>(configJson.JsonText);
|
|
@@ -124,5 +124,22 @@ class ExportUJsonPlugin extends export_table_lib_1.PluginBase {
|
|
|
124
124
|
return content2;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
+
handleBatch(paras) {
|
|
128
|
+
var tables = paras.tables;
|
|
129
|
+
var temp = `
|
|
130
|
+
namespace MEEC.ExportedConfigs
|
|
131
|
+
{
|
|
132
|
+
public static class DefaultConfigLoader{
|
|
133
|
+
public static IEnumerable<Func<Task>> Load(){
|
|
134
|
+
${(0, export_table_lib_1.foreach)(tables, (table) => `
|
|
135
|
+
yield return ${table.name}.Load;
|
|
136
|
+
`)}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`;
|
|
141
|
+
let savePath = paras.outPath + "/DefaultConfigLoader.cs";
|
|
142
|
+
fs.outputFileSync(savePath, temp, "utf-8");
|
|
143
|
+
}
|
|
127
144
|
}
|
|
128
145
|
exports.ExportUJsonPlugin = ExportUJsonPlugin;
|
package/package.json
CHANGED
|
@@ -71,10 +71,10 @@ namespace MEEC.ExportedConfigs
|
|
|
71
71
|
{
|
|
72
72
|
public partial class ${name}
|
|
73
73
|
{
|
|
74
|
-
static
|
|
74
|
+
public static async Task Load()
|
|
75
75
|
{
|
|
76
76
|
var loadUrl="Assets/Bundles/GameConfigs/Auto/${fullName}.asset";
|
|
77
|
-
var configJson = Addressables.LoadAssetAsync<ExcelConfigJson>(loadUrl).
|
|
77
|
+
var configJson = await Addressables.LoadAssetAsync<ExcelConfigJson>(loadUrl).Task;
|
|
78
78
|
if (configJson != null)
|
|
79
79
|
{
|
|
80
80
|
var jsonObjs = JSON.parse<${name}[]>(configJson.JsonText);
|
|
@@ -116,4 +116,22 @@ export class ExportUJsonPlugin extends PluginBase {
|
|
|
116
116
|
return content2
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
+
|
|
120
|
+
handleBatch(paras: HandleBatchParams): void {
|
|
121
|
+
var tables = paras.tables;
|
|
122
|
+
var temp = `
|
|
123
|
+
namespace MEEC.ExportedConfigs
|
|
124
|
+
{
|
|
125
|
+
public static class DefaultConfigLoader{
|
|
126
|
+
public static IEnumerable<Func<Task>> Load(){
|
|
127
|
+
${foreach(tables, (table) => `
|
|
128
|
+
yield return ${table.name}.Load;
|
|
129
|
+
`)}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`
|
|
134
|
+
let savePath = paras.outPath + "/DefaultConfigLoader.cs";
|
|
135
|
+
fs.outputFileSync(savePath, temp, "utf-8");
|
|
136
|
+
}
|
|
119
137
|
}
|
|
@@ -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: 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 恭喜你完成课程内容`\"}]"
|
|
@@ -1,226 +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 任务列表(50000, "口腔", new double[]{}, new int[]{}, "", "", "`/tp @e[type=npc,c=1,tag=消化NPC] 24 47 -171`", ""),
|
|
11
|
-
new 任务列表(50010, "食道和胃", new double[]{}, new int[]{}, "", "", "", "`/title @p title 恭喜你完成口腔关卡`,`/give @p myitem:xhdlxj_modle_kouqiang`"),
|
|
12
|
-
new 任务列表(50020, "小肠", new double[]{}, new int[]{}, "", "", "", "`/title @p title 恭喜你完成食道&胃关卡`,`/give @p myitem:xhdlxj_modle_shiguan`,`/give @p myitem:xhdlxj_modle_wei`"),
|
|
13
|
-
new 任务列表(50030, "大肠", new double[]{}, new int[]{}, "", "", "", "`/title @p title 恭喜你完成小肠关卡`"),
|
|
14
|
-
new 任务列表(50040, "消化拼图", new double[]{}, new int[]{}, "", "", "", "`/title @p title 恭喜你完成大肠关卡`,`/give @p myitem:xhdlxj_modle_xiaochang`,`/give @p myitem:xhdlxj_modle_dachang`"),
|
|
15
|
-
new 任务列表(50050, "恭喜完成", new double[]{}, new int[]{}, "", "", "", "`/title @p title 恭喜你完成课程内容`"),
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
public 任务列表() { }
|
|
19
|
-
public 任务列表(int id, string name, double[] subTasks, int[] taskRewards, string 任务类型, string 任务标签, string startCmds, string succeedCmds)
|
|
20
|
-
{
|
|
21
|
-
this.Id = id;
|
|
22
|
-
this.Name = name;
|
|
23
|
-
this.SubTasks = subTasks;
|
|
24
|
-
this.TaskRewards = taskRewards;
|
|
25
|
-
this.任务类型 = 任务类型;
|
|
26
|
-
this.任务标签 = 任务标签;
|
|
27
|
-
this.StartCmds = startCmds;
|
|
28
|
-
this.SucceedCmds = succeedCmds;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
public virtual 任务列表 MergeFrom(任务列表 source)
|
|
32
|
-
{
|
|
33
|
-
this.Id = source.Id;
|
|
34
|
-
this.Name = source.Name;
|
|
35
|
-
this.SubTasks = source.SubTasks;
|
|
36
|
-
this.TaskRewards = source.TaskRewards;
|
|
37
|
-
this.任务类型 = source.任务类型;
|
|
38
|
-
this.任务标签 = source.任务标签;
|
|
39
|
-
this.StartCmds = source.StartCmds;
|
|
40
|
-
this.SucceedCmds = source.SucceedCmds;
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public virtual 任务列表 Clone()
|
|
45
|
-
{
|
|
46
|
-
var config = new 任务列表();
|
|
47
|
-
config.MergeFrom(this);
|
|
48
|
-
return config;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/// <summary>
|
|
53
|
-
/// 任务ID
|
|
54
|
-
/// </summary>
|
|
55
|
-
public int Id;
|
|
56
|
-
/// <summary>
|
|
57
|
-
/// 任务名称
|
|
58
|
-
/// </summary>
|
|
59
|
-
public string Name;
|
|
60
|
-
/// <summary>
|
|
61
|
-
/// 子任务
|
|
62
|
-
/// </summary>
|
|
63
|
-
public double[] SubTasks;
|
|
64
|
-
/// <summary>
|
|
65
|
-
/// 奖励物品
|
|
66
|
-
/// wilwin wilwin:
|
|
67
|
-
/// 可配置多个,符号 ";" 号分割
|
|
68
|
-
/// 1001;1002;1003
|
|
69
|
-
/// </summary>
|
|
70
|
-
public int[] TaskRewards;
|
|
71
|
-
/// <summary>
|
|
72
|
-
/// 任务类型(客户端展示分类)
|
|
73
|
-
/// </summary>
|
|
74
|
-
public string 任务类型;
|
|
75
|
-
/// <summary>
|
|
76
|
-
/// 任务标签(客户端展示)
|
|
77
|
-
/// </summary>
|
|
78
|
-
public string 任务标签;
|
|
79
|
-
/// <summary>
|
|
80
|
-
/// 任务开始执行命令
|
|
81
|
-
/// </summary>
|
|
82
|
-
public string StartCmds;
|
|
83
|
-
/// <summary>
|
|
84
|
-
/// 任务成功执行命令
|
|
85
|
-
/// </summary>
|
|
86
|
-
public string SucceedCmds;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
#region get字段
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
#endregion
|
|
99
|
-
|
|
100
|
-
#region uid map
|
|
101
|
-
protected static Dictionary<int, 任务列表> _tempDictById;
|
|
102
|
-
public static 任务列表 GetConfigById(int Id)
|
|
103
|
-
{
|
|
104
|
-
if (_tempDictById == null)
|
|
105
|
-
{
|
|
106
|
-
_tempDictById = new Dictionary<int, 任务列表>();
|
|
107
|
-
Configs.ForEach(c =>
|
|
108
|
-
{
|
|
109
|
-
_tempDictById.Add(c.Id, c);
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
return _tempDictById.GetValueOrDefault(Id);
|
|
113
|
-
}
|
|
114
|
-
protected static Dictionary<string, 任务列表[]> _tempRecordsDictByName = new Dictionary<string, 任务列表[]>();
|
|
115
|
-
public static 任务列表[] GetConfigsByName(string Name)
|
|
116
|
-
{
|
|
117
|
-
if (_tempRecordsDictByName.ContainsKey(Name))
|
|
118
|
-
{
|
|
119
|
-
return _tempRecordsDictByName.GetValueOrDefault(Name);
|
|
120
|
-
}
|
|
121
|
-
else
|
|
122
|
-
{
|
|
123
|
-
var records = Configs.Where(c => c.Name == Name).ToArray();
|
|
124
|
-
_tempRecordsDictByName.Add(Name, records);
|
|
125
|
-
return records;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
protected static Dictionary<string, 任务列表[]> _tempRecordsDictBy任务类型 = new Dictionary<string, 任务列表[]>();
|
|
131
|
-
public static 任务列表[] GetConfigsBy任务类型(string 任务类型)
|
|
132
|
-
{
|
|
133
|
-
if (_tempRecordsDictBy任务类型.ContainsKey(任务类型))
|
|
134
|
-
{
|
|
135
|
-
return _tempRecordsDictBy任务类型.GetValueOrDefault(任务类型);
|
|
136
|
-
}
|
|
137
|
-
else
|
|
138
|
-
{
|
|
139
|
-
var records = Configs.Where(c => c.任务类型 == 任务类型).ToArray();
|
|
140
|
-
_tempRecordsDictBy任务类型.Add(任务类型, records);
|
|
141
|
-
return records;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
protected static Dictionary<string, 任务列表[]> _tempRecordsDictBy任务标签 = new Dictionary<string, 任务列表[]>();
|
|
145
|
-
public static 任务列表[] GetConfigsBy任务标签(string 任务标签)
|
|
146
|
-
{
|
|
147
|
-
if (_tempRecordsDictBy任务标签.ContainsKey(任务标签))
|
|
148
|
-
{
|
|
149
|
-
return _tempRecordsDictBy任务标签.GetValueOrDefault(任务标签);
|
|
150
|
-
}
|
|
151
|
-
else
|
|
152
|
-
{
|
|
153
|
-
var records = Configs.Where(c => c.任务标签 == 任务标签).ToArray();
|
|
154
|
-
_tempRecordsDictBy任务标签.Add(任务标签, records);
|
|
155
|
-
return records;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
protected static Dictionary<string, 任务列表[]> _tempRecordsDictByStartCmds = new Dictionary<string, 任务列表[]>();
|
|
159
|
-
public static 任务列表[] GetConfigsByStartCmds(string StartCmds)
|
|
160
|
-
{
|
|
161
|
-
if (_tempRecordsDictByStartCmds.ContainsKey(StartCmds))
|
|
162
|
-
{
|
|
163
|
-
return _tempRecordsDictByStartCmds.GetValueOrDefault(StartCmds);
|
|
164
|
-
}
|
|
165
|
-
else
|
|
166
|
-
{
|
|
167
|
-
var records = Configs.Where(c => c.StartCmds == StartCmds).ToArray();
|
|
168
|
-
_tempRecordsDictByStartCmds.Add(StartCmds, records);
|
|
169
|
-
return records;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
protected static Dictionary<string, 任务列表[]> _tempRecordsDictBySucceedCmds = new Dictionary<string, 任务列表[]>();
|
|
173
|
-
public static 任务列表[] GetConfigsBySucceedCmds(string SucceedCmds)
|
|
174
|
-
{
|
|
175
|
-
if (_tempRecordsDictBySucceedCmds.ContainsKey(SucceedCmds))
|
|
176
|
-
{
|
|
177
|
-
return _tempRecordsDictBySucceedCmds.GetValueOrDefault(SucceedCmds);
|
|
178
|
-
}
|
|
179
|
-
else
|
|
180
|
-
{
|
|
181
|
-
var records = Configs.Where(c => c.SucceedCmds == SucceedCmds).ToArray();
|
|
182
|
-
_tempRecordsDictBySucceedCmds.Add(SucceedCmds, records);
|
|
183
|
-
return records;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
#endregion uid map
|
|
188
|
-
|
|
189
|
-
#region 生成fk.get/set
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
protected 任务奖励[] _fkTaskRewards=null;
|
|
198
|
-
/**
|
|
199
|
-
* 奖励物品
|
|
200
|
-
wilwin wilwin:
|
|
201
|
-
可配置多个,符号 ";" 号分割
|
|
202
|
-
1001;1002;1003
|
|
203
|
-
**/
|
|
204
|
-
public virtual 任务奖励[] TaskRewardsDataList{
|
|
205
|
-
get{
|
|
206
|
-
if(this._fkTaskRewards==null){
|
|
207
|
-
if(null==this.TaskRewards){
|
|
208
|
-
this._fkTaskRewards = new 任务奖励[0];
|
|
209
|
-
}else{
|
|
210
|
-
this._fkTaskRewards=MEEC.ExportedConfigs.任务奖励.Configs.FindAll(a=>a.Id!=null && this.TaskRewards!.Contains(a.Id)).ToArray();
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
return this._fkTaskRewards;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
#endregion 生成fk.get/set
|
|
225
|
-
}
|
|
226
|
-
}
|
|
@@ -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: EGBL任务配置-任务奖励
|
|
14
|
-
m_EditorClassIdentifier:
|
|
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}]"
|
|
@@ -1,115 +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 任务奖励(1001, "apple", 1),
|
|
11
|
-
new 任务奖励(1002, "apple", 1),
|
|
12
|
-
new 任务奖励(1003, "apple", 1),
|
|
13
|
-
new 任务奖励(1004, "apple", 1),
|
|
14
|
-
new 任务奖励(1005, "apple", 1),
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
public 任务奖励() { }
|
|
18
|
-
public 任务奖励(int id, string props1, double count1)
|
|
19
|
-
{
|
|
20
|
-
this.Id = id;
|
|
21
|
-
this.Props1 = props1;
|
|
22
|
-
this.Count1 = count1;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public virtual 任务奖励 MergeFrom(任务奖励 source)
|
|
26
|
-
{
|
|
27
|
-
this.Id = source.Id;
|
|
28
|
-
this.Props1 = source.Props1;
|
|
29
|
-
this.Count1 = source.Count1;
|
|
30
|
-
return this;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
public virtual 任务奖励 Clone()
|
|
34
|
-
{
|
|
35
|
-
var config = new 任务奖励();
|
|
36
|
-
config.MergeFrom(this);
|
|
37
|
-
return config;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/// <summary>
|
|
42
|
-
/// 奖励ID
|
|
43
|
-
/// </summary>
|
|
44
|
-
public int Id;
|
|
45
|
-
/// <summary>
|
|
46
|
-
/// 道具1
|
|
47
|
-
/// </summary>
|
|
48
|
-
public string Props1;
|
|
49
|
-
/// <summary>
|
|
50
|
-
/// 数量1
|
|
51
|
-
/// </summary>
|
|
52
|
-
public double Count1;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
#region get字段
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
#endregion
|
|
60
|
-
|
|
61
|
-
#region uid map
|
|
62
|
-
protected static Dictionary<int, 任务奖励> _tempDictById;
|
|
63
|
-
public static 任务奖励 GetConfigById(int Id)
|
|
64
|
-
{
|
|
65
|
-
if (_tempDictById == null)
|
|
66
|
-
{
|
|
67
|
-
_tempDictById = new Dictionary<int, 任务奖励>();
|
|
68
|
-
Configs.ForEach(c =>
|
|
69
|
-
{
|
|
70
|
-
_tempDictById.Add(c.Id, c);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return _tempDictById.GetValueOrDefault(Id);
|
|
74
|
-
}
|
|
75
|
-
protected static Dictionary<string, 任务奖励[]> _tempRecordsDictByProps1 = new Dictionary<string, 任务奖励[]>();
|
|
76
|
-
public static 任务奖励[] GetConfigsByProps1(string Props1)
|
|
77
|
-
{
|
|
78
|
-
if (_tempRecordsDictByProps1.ContainsKey(Props1))
|
|
79
|
-
{
|
|
80
|
-
return _tempRecordsDictByProps1.GetValueOrDefault(Props1);
|
|
81
|
-
}
|
|
82
|
-
else
|
|
83
|
-
{
|
|
84
|
-
var records = Configs.Where(c => c.Props1 == Props1).ToArray();
|
|
85
|
-
_tempRecordsDictByProps1.Add(Props1, records);
|
|
86
|
-
return records;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
protected static Dictionary<double, 任务奖励[]> _tempRecordsDictByCount1 = new Dictionary<double, 任务奖励[]>();
|
|
90
|
-
public static 任务奖励[] GetConfigsByCount1(double Count1)
|
|
91
|
-
{
|
|
92
|
-
if (_tempRecordsDictByCount1.ContainsKey(Count1))
|
|
93
|
-
{
|
|
94
|
-
return _tempRecordsDictByCount1.GetValueOrDefault(Count1);
|
|
95
|
-
}
|
|
96
|
-
else
|
|
97
|
-
{
|
|
98
|
-
var records = Configs.Where(c => c.Count1 == Count1).ToArray();
|
|
99
|
-
_tempRecordsDictByCount1.Add(Count1, records);
|
|
100
|
-
return records;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
#endregion uid map
|
|
105
|
-
|
|
106
|
-
#region 生成fk.get/set
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
#endregion 生成fk.get/set
|
|
114
|
-
}
|
|
115
|
-
}
|
|
@@ -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: EGBL任务配置-任务时限
|
|
14
|
-
m_EditorClassIdentifier:
|
|
15
|
-
JsonText: "[{\"Id\":1001,\"Duration\":24}]"
|
|
@@ -1,88 +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 任务时限(1001, 24),
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
public 任务时限() { }
|
|
14
|
-
public 任务时限(int id, double duration)
|
|
15
|
-
{
|
|
16
|
-
this.Id = id;
|
|
17
|
-
this.Duration = duration;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public virtual 任务时限 MergeFrom(任务时限 source)
|
|
21
|
-
{
|
|
22
|
-
this.Id = source.Id;
|
|
23
|
-
this.Duration = source.Duration;
|
|
24
|
-
return this;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public virtual 任务时限 Clone()
|
|
28
|
-
{
|
|
29
|
-
var config = new 任务时限();
|
|
30
|
-
config.MergeFrom(this);
|
|
31
|
-
return config;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/// <summary>
|
|
36
|
-
/// id
|
|
37
|
-
/// </summary>
|
|
38
|
-
public int Id;
|
|
39
|
-
/// <summary>
|
|
40
|
-
/// 最大时限
|
|
41
|
-
/// </summary>
|
|
42
|
-
public double Duration;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
#region get字段
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
#endregion
|
|
49
|
-
|
|
50
|
-
#region uid map
|
|
51
|
-
protected static Dictionary<int, 任务时限> _tempDictById;
|
|
52
|
-
public static 任务时限 GetConfigById(int Id)
|
|
53
|
-
{
|
|
54
|
-
if (_tempDictById == null)
|
|
55
|
-
{
|
|
56
|
-
_tempDictById = new Dictionary<int, 任务时限>();
|
|
57
|
-
Configs.ForEach(c =>
|
|
58
|
-
{
|
|
59
|
-
_tempDictById.Add(c.Id, c);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return _tempDictById.GetValueOrDefault(Id);
|
|
63
|
-
}
|
|
64
|
-
protected static Dictionary<double, 任务时限[]> _tempRecordsDictByDuration = new Dictionary<double, 任务时限[]>();
|
|
65
|
-
public static 任务时限[] GetConfigsByDuration(double Duration)
|
|
66
|
-
{
|
|
67
|
-
if (_tempRecordsDictByDuration.ContainsKey(Duration))
|
|
68
|
-
{
|
|
69
|
-
return _tempRecordsDictByDuration.GetValueOrDefault(Duration);
|
|
70
|
-
}
|
|
71
|
-
else
|
|
72
|
-
{
|
|
73
|
-
var records = Configs.Where(c => c.Duration == Duration).ToArray();
|
|
74
|
-
_tempRecordsDictByDuration.Add(Duration, records);
|
|
75
|
-
return records;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
#endregion uid map
|
|
80
|
-
|
|
81
|
-
#region 生成fk.get/set
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
#endregion 生成fk.get/set
|
|
87
|
-
}
|
|
88
|
-
}
|
|
@@ -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: 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}]"
|