export-table-pulgin-csharp 1.0.40 → 1.0.43
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 +21 -4
- package/dist/ExportUnityCSJsonPlugin.d.ts.map +1 -1
- package/dist/ExportUnityCSJsonPlugin.js +17 -1
- package/dist/launch.d.ts +1 -0
- package/dist/launch.js +5 -0
- package/dist/launch.js.map +1 -0
- package/dist//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250-unit.cs +94 -0
- package/dist//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250-unit/350/241/250.cs +276 -0
- package/dist//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250-/344/270/223/345/256/266/350/257/204/344/273/267.cs +210 -0
- package/dist//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250-/344/270/273/351/242/230/344/277/241/346/201/257/350/241/250.cs +285 -0
- package/dist//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250-/344/270/273/351/242/230/345/257/271/345/272/224unit.cs +93 -0
- package/dist//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250-/344/273/273/345/212/241/345/260/217/347/273/223.cs +141 -0
- package/dist//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250-/344/273/273/345/212/241/350/241/250.cs +151 -0
- package/dist//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250-/344/273/273/345/212/241/350/247/246/345/217/221/350/241/250.cs +111 -0
- package/package.json +25 -25
- package/quicktable//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250.xlsx +0 -0
- package/src/ExportCSPlugin.ts +20 -4
- package/src/ExportUnityCSJsonPlugin.ts +18 -1
- package/src//350/257/276/347/250/213/344/277/241/346/201/257/350/241/250.xlsx +0 -0
- package/test/dist/SceneConfig.cs +55 -112
- package/test/dist/SceneConfig.csharp +0 -0
- package/test/dist/SceneConfig.csx +55 -0
- package/test/dist/Sheet2.csharp +0 -0
- package/test/dist/table.csharp +0 -0
- package/test/{testCS.bat → test.bat} +0 -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.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-Sheet2Loader.cs +0 -26
- 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//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
- package/test/testUJson.bat +0 -1
package/dist/ExportCSPlugin.js
CHANGED
|
@@ -45,10 +45,12 @@ function export_stuff(paras) {
|
|
|
45
45
|
let getFieldType = function (f) {
|
|
46
46
|
let t = f.type;
|
|
47
47
|
if (t == "object") {
|
|
48
|
-
throw new Error("invalid type <
|
|
48
|
+
//throw new Error("invalid type <Dictionary<string,string>>")
|
|
49
|
+
return "Dictionary<string,string>";
|
|
49
50
|
}
|
|
50
51
|
else if (t == "object[]") {
|
|
51
|
-
throw new Error("invalid type <
|
|
52
|
+
//throw new Error("invalid type <Dictionary<string,string>[]>")
|
|
53
|
+
return "List<Dictionary<string,string>>";
|
|
52
54
|
}
|
|
53
55
|
else if (t == "number") {
|
|
54
56
|
return "double";
|
|
@@ -95,10 +97,25 @@ function export_stuff(paras) {
|
|
|
95
97
|
const genValue = (value, f) => {
|
|
96
98
|
let t = f.type;
|
|
97
99
|
if (t == "object") {
|
|
98
|
-
throw new Error("invalid type <object>")
|
|
100
|
+
//throw new Error("invalid type <object>")
|
|
101
|
+
let convert = [];
|
|
102
|
+
for (let k in value) {
|
|
103
|
+
convert.push(`{"${k}","${value[k].toString()}"}`);
|
|
104
|
+
}
|
|
105
|
+
;
|
|
106
|
+
return `new Dictionary<string,string>(){${convert}}`;
|
|
99
107
|
}
|
|
100
108
|
else if (t == "object[]") {
|
|
101
|
-
|
|
109
|
+
let values = value;
|
|
110
|
+
//throw new Error("invalid type <object[]>")
|
|
111
|
+
return `new List<Dictionary<string,string>>(){${values.map((val) => {
|
|
112
|
+
let convert = [];
|
|
113
|
+
for (let k in val) {
|
|
114
|
+
convert.push(`{"${k}","${val[k].toString()}"}`);
|
|
115
|
+
}
|
|
116
|
+
;
|
|
117
|
+
return `new Dictionary<string,string>(){${convert}}`;
|
|
118
|
+
})}}`;
|
|
102
119
|
}
|
|
103
120
|
else if (t == "number") {
|
|
104
121
|
return `${value}`;
|
|
@@ -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,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,
|
|
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,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;CAkBpC"}
|
|
@@ -28,8 +28,24 @@ const export_table_lib_1 = require("export-table-lib");
|
|
|
28
28
|
const fs = __importStar(require("fs-extra"));
|
|
29
29
|
function exportUJson(paras) {
|
|
30
30
|
let { datas, fields, name, objects, table, } = paras;
|
|
31
|
+
let firstLetterUpper = function (str) {
|
|
32
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
33
|
+
};
|
|
34
|
+
let firstLetterLower = function (str) {
|
|
35
|
+
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
36
|
+
};
|
|
37
|
+
let convMemberName = function (str) {
|
|
38
|
+
return str.split("_").map(s => firstLetterUpper(s)).join("");
|
|
39
|
+
};
|
|
31
40
|
var fullName = `${table.workbookName}-${name}`;
|
|
32
|
-
let jsonString = JSON.stringify(objects
|
|
41
|
+
let jsonString = JSON.stringify(objects.map(obj => {
|
|
42
|
+
var newObj = Object.create(null);
|
|
43
|
+
Object.keys(obj).forEach(key => {
|
|
44
|
+
var newKey = convMemberName(key);
|
|
45
|
+
newObj[newKey] = obj[key];
|
|
46
|
+
});
|
|
47
|
+
return newObj;
|
|
48
|
+
}));
|
|
33
49
|
// !!!必须开头没有空格
|
|
34
50
|
let temp = `%YAML 1.1
|
|
35
51
|
%TAG !u! tag:unity3d.com,2011:
|
package/dist/launch.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/launch.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch.js","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mappings":";;AACA,yDAAmE;AAEnE,IAAA,6BAAoB,GAAE,CAAA"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.Linq;
|
|
4
|
+
|
|
5
|
+
namespace MEEC.ExportedConfigs{
|
|
6
|
+
public partial class Unit {
|
|
7
|
+
|
|
8
|
+
public static List<Unit> Configs = new List<Unit>()
|
|
9
|
+
{
|
|
10
|
+
new Unit(1001, 1),
|
|
11
|
+
new Unit(1002, 2),
|
|
12
|
+
new Unit(1003, 3),
|
|
13
|
+
new Unit(2001, 1),
|
|
14
|
+
new Unit(3001, 1),
|
|
15
|
+
new Unit(4001, 1),
|
|
16
|
+
new Unit(4002, 2),
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
public Unit() { }
|
|
20
|
+
public Unit(int unit_id, double value)
|
|
21
|
+
{
|
|
22
|
+
this.UnitId = unit_id;
|
|
23
|
+
this.Value = value;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public virtual Unit MergeFrom(Unit source)
|
|
27
|
+
{
|
|
28
|
+
this.UnitId = source.UnitId;
|
|
29
|
+
this.Value = source.Value;
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public virtual Unit Clone()
|
|
34
|
+
{
|
|
35
|
+
var config = new Unit();
|
|
36
|
+
config.MergeFrom(this);
|
|
37
|
+
return config;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/// <summary>
|
|
42
|
+
/// unit_id
|
|
43
|
+
/// </summary>
|
|
44
|
+
public int UnitId;
|
|
45
|
+
/// <summary>
|
|
46
|
+
/// value
|
|
47
|
+
/// </summary>
|
|
48
|
+
public double Value;
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
#region get字段
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
#endregion
|
|
55
|
+
|
|
56
|
+
#region uid map
|
|
57
|
+
protected static Dictionary<int, Unit> _tempDictByUnitId;
|
|
58
|
+
public static Unit GetConfigByUnitId(int UnitId)
|
|
59
|
+
{
|
|
60
|
+
if (_tempDictByUnitId == null)
|
|
61
|
+
{
|
|
62
|
+
_tempDictByUnitId = new Dictionary<int, Unit>();
|
|
63
|
+
Configs.ForEach(c =>
|
|
64
|
+
{
|
|
65
|
+
_tempDictByUnitId.Add(c.UnitId, c);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return _tempDictByUnitId.GetValueOrDefault(UnitId);
|
|
69
|
+
}
|
|
70
|
+
protected static Dictionary<double, Unit[]> _tempRecordsDictByValue = new Dictionary<double, Unit[]>();
|
|
71
|
+
public static Unit[] GetConfigsByValue(double Value)
|
|
72
|
+
{
|
|
73
|
+
if (_tempRecordsDictByValue.ContainsKey(Value))
|
|
74
|
+
{
|
|
75
|
+
return _tempRecordsDictByValue.GetValueOrDefault(Value);
|
|
76
|
+
}
|
|
77
|
+
else
|
|
78
|
+
{
|
|
79
|
+
var records = Configs.Where(c => c.Value == Value).ToArray();
|
|
80
|
+
_tempRecordsDictByValue.Add(Value, records);
|
|
81
|
+
return records;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
#endregion uid map
|
|
86
|
+
|
|
87
|
+
#region 生成fk.get/set
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
#endregion 生成fk.get/set
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.Linq;
|
|
4
|
+
|
|
5
|
+
namespace MEEC.ExportedConfigs{
|
|
6
|
+
public partial class Unit表 {
|
|
7
|
+
|
|
8
|
+
public static List<Unit表> Configs = new List<Unit表>()
|
|
9
|
+
{
|
|
10
|
+
new Unit表(1001, "10001", "云朵博物馆", "", new string[]{"逻辑力", "观察力", "思考力"}, "3", "unit_icon_jurassic.png", 1, 1, 1, new List<Dictionary<string,string>>(){new Dictionary<string,string>(){{"id","1001"},{"val","10"}},new Dictionary<string,string>(){{"id","1002"},{"val","10"}},new Dictionary<string,string>(){{"id","4005"},{"val","10"}}}),
|
|
11
|
+
new Unit表(1002, "10001", "消化道历险记", "", new string[]{"专注力;观察力", "逻辑力"}, "3", "unit_icon_jurassic.png", 1, 5, 15, new List<Dictionary<string,string>>(){new Dictionary<string,string>(){{"id","1003"},{"val","10"}},new Dictionary<string,string>(){{"id","1002"},{"val","10"}},new Dictionary<string,string>(){{"id","1001"},{"val","10"}}}),
|
|
12
|
+
new Unit表(1003, "10001", "人体警卫员", "", new string[]{"统筹力;观察力", "逻辑力"}, "3", "unit_icon_jurassic.png", 1, 5, 16, new List<Dictionary<string,string>>(){new Dictionary<string,string>(){{"id","3002"},{"val","10"}},new Dictionary<string,string>(){{"id","1001"},{"val","10"}},new Dictionary<string,string>(){{"id","1002"},{"val","10"}}}),
|
|
13
|
+
new Unit表(2001, "10001", "航天服大修理", "《航天服大修理》是以空间站为背景的一次太空大冒险,当你进入太空,还能像在地球上一样行走吗?从宇宙看地球什么样?航天服竟然是用日常材料做成的?这些问题都会在这里得到解答。快来修复航天服,拯救空间站吧!", new string[]{"逻辑力", "观察力", "思考力"}, "3", "unit_icon_jurassic.png", 4, 11, 32, new List<Dictionary<string,string>>(){new Dictionary<string,string>(){{"id","1001"},{"val","10"}},new Dictionary<string,string>(){{"id","1002"},{"val","10"}},new Dictionary<string,string>(){{"id","4005"},{"val","10"}}}),
|
|
14
|
+
new Unit表(3001, "10001", "红爪鸡不见了", "", new string[]{"思考力", "分析力", "记忆力"}, "3", "unit_icon_seabed.png", 2, 16, 57, new List<Dictionary<string,string>>(){new Dictionary<string,string>(){{"id","4005"},{"val","10"}},new Dictionary<string,string>(){{"id","1004"},{"val","10"}},new Dictionary<string,string>(){{"id","4003"},{"val","10"}}}),
|
|
15
|
+
new Unit表(4001, "10001", "block101-动物放生", "", new string[]{"编程思维", "观察力", "专注力"}, "3", "unit_icon_jurassic.png", 4, 14, 37, new List<Dictionary<string,string>>(){new Dictionary<string,string>(){{"id","1006"},{"val","10"}},new Dictionary<string,string>(){{"id","1002"},{"val","10"}},new Dictionary<string,string>(){{"id","1003"},{"val","10"}}}),
|
|
16
|
+
new Unit表(4002, "10001", "block101-熊猫救援", "", new string[]{"编程思维", "观察力", "专注力"}, "3", "unit_icon_jurassic.png", 4, 14, 45, new List<Dictionary<string,string>>(){new Dictionary<string,string>(){{"id","1006"},{"val","10"}},new Dictionary<string,string>(){{"id","1002"},{"val","10"}},new Dictionary<string,string>(){{"id","1003"},{"val","10"}}}),
|
|
17
|
+
new Unit表(4003, "10001", "block101-稀有矿产", "", new string[]{"编程思维", "观察力", "专注力"}, "3", "unit_icon_jurassic.png", 4, 14, 45, new List<Dictionary<string,string>>(){new Dictionary<string,string>(){{"id","1006"},{"val","10"}},new Dictionary<string,string>(){{"id","1002"},{"val","10"}},new Dictionary<string,string>(){{"id","1003"},{"val","10"}}}),
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
public Unit表() { }
|
|
21
|
+
public Unit表(int unit_id, string scene_id, string unit_name, string decs, string[] powerTags, string rewards, string iconPath, double area, double subject, double theme, List<Dictionary<string,string>> power_up)
|
|
22
|
+
{
|
|
23
|
+
this.UnitId = unit_id;
|
|
24
|
+
this.SceneId = scene_id;
|
|
25
|
+
this.UnitName = unit_name;
|
|
26
|
+
this.Decs = decs;
|
|
27
|
+
this.PowerTags = powerTags;
|
|
28
|
+
this.Rewards = rewards;
|
|
29
|
+
this.IconPath = iconPath;
|
|
30
|
+
this.Area = area;
|
|
31
|
+
this.Subject = subject;
|
|
32
|
+
this.Theme = theme;
|
|
33
|
+
this.PowerUp = power_up;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public virtual Unit表 MergeFrom(Unit表 source)
|
|
37
|
+
{
|
|
38
|
+
this.UnitId = source.UnitId;
|
|
39
|
+
this.SceneId = source.SceneId;
|
|
40
|
+
this.UnitName = source.UnitName;
|
|
41
|
+
this.Decs = source.Decs;
|
|
42
|
+
this.PowerTags = source.PowerTags;
|
|
43
|
+
this.Rewards = source.Rewards;
|
|
44
|
+
this.IconPath = source.IconPath;
|
|
45
|
+
this.Area = source.Area;
|
|
46
|
+
this.Subject = source.Subject;
|
|
47
|
+
this.Theme = source.Theme;
|
|
48
|
+
this.PowerUp = source.PowerUp;
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public virtual Unit表 Clone()
|
|
53
|
+
{
|
|
54
|
+
var config = new Unit表();
|
|
55
|
+
config.MergeFrom(this);
|
|
56
|
+
return config;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/// <summary>
|
|
61
|
+
/// unit_id
|
|
62
|
+
/// </summary>
|
|
63
|
+
public int UnitId;
|
|
64
|
+
/// <summary>
|
|
65
|
+
/// 场景id
|
|
66
|
+
/// </summary>
|
|
67
|
+
public string SceneId;
|
|
68
|
+
/// <summary>
|
|
69
|
+
/// 名称
|
|
70
|
+
/// </summary>
|
|
71
|
+
public string UnitName;
|
|
72
|
+
/// <summary>
|
|
73
|
+
/// 课程简介
|
|
74
|
+
/// </summary>
|
|
75
|
+
public string Decs;
|
|
76
|
+
/// <summary>
|
|
77
|
+
/// 能力提升
|
|
78
|
+
/// </summary>
|
|
79
|
+
public string[] PowerTags;
|
|
80
|
+
/// <summary>
|
|
81
|
+
/// 星级奖励
|
|
82
|
+
/// </summary>
|
|
83
|
+
public string Rewards;
|
|
84
|
+
/// <summary>
|
|
85
|
+
/// icon图标
|
|
86
|
+
/// </summary>
|
|
87
|
+
public string IconPath;
|
|
88
|
+
/// <summary>
|
|
89
|
+
/// 所属领域
|
|
90
|
+
/// </summary>
|
|
91
|
+
public double Area;
|
|
92
|
+
/// <summary>
|
|
93
|
+
/// 所属科目
|
|
94
|
+
/// </summary>
|
|
95
|
+
public double Subject;
|
|
96
|
+
/// <summary>
|
|
97
|
+
/// 所属主题
|
|
98
|
+
/// </summary>
|
|
99
|
+
public double Theme;
|
|
100
|
+
/// <summary>
|
|
101
|
+
/// 能力值提升
|
|
102
|
+
/// </summary>
|
|
103
|
+
public List<Dictionary<string,string>> PowerUp;
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
#region get字段
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
#endregion
|
|
119
|
+
|
|
120
|
+
#region uid map
|
|
121
|
+
protected static Dictionary<int, Unit表> _tempDictByUnitId;
|
|
122
|
+
public static Unit表 GetConfigByUnitId(int UnitId)
|
|
123
|
+
{
|
|
124
|
+
if (_tempDictByUnitId == null)
|
|
125
|
+
{
|
|
126
|
+
_tempDictByUnitId = new Dictionary<int, Unit表>();
|
|
127
|
+
Configs.ForEach(c =>
|
|
128
|
+
{
|
|
129
|
+
_tempDictByUnitId.Add(c.UnitId, c);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return _tempDictByUnitId.GetValueOrDefault(UnitId);
|
|
133
|
+
}
|
|
134
|
+
protected static Dictionary<string, Unit表[]> _tempRecordsDictBySceneId = new Dictionary<string, Unit表[]>();
|
|
135
|
+
public static Unit表[] GetConfigsBySceneId(string SceneId)
|
|
136
|
+
{
|
|
137
|
+
if (_tempRecordsDictBySceneId.ContainsKey(SceneId))
|
|
138
|
+
{
|
|
139
|
+
return _tempRecordsDictBySceneId.GetValueOrDefault(SceneId);
|
|
140
|
+
}
|
|
141
|
+
else
|
|
142
|
+
{
|
|
143
|
+
var records = Configs.Where(c => c.SceneId == SceneId).ToArray();
|
|
144
|
+
_tempRecordsDictBySceneId.Add(SceneId, records);
|
|
145
|
+
return records;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
protected static Dictionary<string, Unit表[]> _tempRecordsDictByUnitName = new Dictionary<string, Unit表[]>();
|
|
149
|
+
public static Unit表[] GetConfigsByUnitName(string UnitName)
|
|
150
|
+
{
|
|
151
|
+
if (_tempRecordsDictByUnitName.ContainsKey(UnitName))
|
|
152
|
+
{
|
|
153
|
+
return _tempRecordsDictByUnitName.GetValueOrDefault(UnitName);
|
|
154
|
+
}
|
|
155
|
+
else
|
|
156
|
+
{
|
|
157
|
+
var records = Configs.Where(c => c.UnitName == UnitName).ToArray();
|
|
158
|
+
_tempRecordsDictByUnitName.Add(UnitName, records);
|
|
159
|
+
return records;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
protected static Dictionary<string, Unit表[]> _tempRecordsDictByDecs = new Dictionary<string, Unit表[]>();
|
|
163
|
+
public static Unit表[] GetConfigsByDecs(string Decs)
|
|
164
|
+
{
|
|
165
|
+
if (_tempRecordsDictByDecs.ContainsKey(Decs))
|
|
166
|
+
{
|
|
167
|
+
return _tempRecordsDictByDecs.GetValueOrDefault(Decs);
|
|
168
|
+
}
|
|
169
|
+
else
|
|
170
|
+
{
|
|
171
|
+
var records = Configs.Where(c => c.Decs == Decs).ToArray();
|
|
172
|
+
_tempRecordsDictByDecs.Add(Decs, records);
|
|
173
|
+
return records;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
protected static Dictionary<string, Unit表[]> _tempRecordsDictByRewards = new Dictionary<string, Unit表[]>();
|
|
178
|
+
public static Unit表[] GetConfigsByRewards(string Rewards)
|
|
179
|
+
{
|
|
180
|
+
if (_tempRecordsDictByRewards.ContainsKey(Rewards))
|
|
181
|
+
{
|
|
182
|
+
return _tempRecordsDictByRewards.GetValueOrDefault(Rewards);
|
|
183
|
+
}
|
|
184
|
+
else
|
|
185
|
+
{
|
|
186
|
+
var records = Configs.Where(c => c.Rewards == Rewards).ToArray();
|
|
187
|
+
_tempRecordsDictByRewards.Add(Rewards, records);
|
|
188
|
+
return records;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
protected static Dictionary<string, Unit表[]> _tempRecordsDictByIconPath = new Dictionary<string, Unit表[]>();
|
|
192
|
+
public static Unit表[] GetConfigsByIconPath(string IconPath)
|
|
193
|
+
{
|
|
194
|
+
if (_tempRecordsDictByIconPath.ContainsKey(IconPath))
|
|
195
|
+
{
|
|
196
|
+
return _tempRecordsDictByIconPath.GetValueOrDefault(IconPath);
|
|
197
|
+
}
|
|
198
|
+
else
|
|
199
|
+
{
|
|
200
|
+
var records = Configs.Where(c => c.IconPath == IconPath).ToArray();
|
|
201
|
+
_tempRecordsDictByIconPath.Add(IconPath, records);
|
|
202
|
+
return records;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
protected static Dictionary<double, Unit表[]> _tempRecordsDictByArea = new Dictionary<double, Unit表[]>();
|
|
206
|
+
public static Unit表[] GetConfigsByArea(double Area)
|
|
207
|
+
{
|
|
208
|
+
if (_tempRecordsDictByArea.ContainsKey(Area))
|
|
209
|
+
{
|
|
210
|
+
return _tempRecordsDictByArea.GetValueOrDefault(Area);
|
|
211
|
+
}
|
|
212
|
+
else
|
|
213
|
+
{
|
|
214
|
+
var records = Configs.Where(c => c.Area == Area).ToArray();
|
|
215
|
+
_tempRecordsDictByArea.Add(Area, records);
|
|
216
|
+
return records;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
protected static Dictionary<double, Unit表[]> _tempRecordsDictBySubject = new Dictionary<double, Unit表[]>();
|
|
220
|
+
public static Unit表[] GetConfigsBySubject(double Subject)
|
|
221
|
+
{
|
|
222
|
+
if (_tempRecordsDictBySubject.ContainsKey(Subject))
|
|
223
|
+
{
|
|
224
|
+
return _tempRecordsDictBySubject.GetValueOrDefault(Subject);
|
|
225
|
+
}
|
|
226
|
+
else
|
|
227
|
+
{
|
|
228
|
+
var records = Configs.Where(c => c.Subject == Subject).ToArray();
|
|
229
|
+
_tempRecordsDictBySubject.Add(Subject, records);
|
|
230
|
+
return records;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
protected static Dictionary<double, Unit表[]> _tempRecordsDictByTheme = new Dictionary<double, Unit表[]>();
|
|
234
|
+
public static Unit表[] GetConfigsByTheme(double Theme)
|
|
235
|
+
{
|
|
236
|
+
if (_tempRecordsDictByTheme.ContainsKey(Theme))
|
|
237
|
+
{
|
|
238
|
+
return _tempRecordsDictByTheme.GetValueOrDefault(Theme);
|
|
239
|
+
}
|
|
240
|
+
else
|
|
241
|
+
{
|
|
242
|
+
var records = Configs.Where(c => c.Theme == Theme).ToArray();
|
|
243
|
+
_tempRecordsDictByTheme.Add(Theme, records);
|
|
244
|
+
return records;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
#endregion uid map
|
|
250
|
+
|
|
251
|
+
#region 生成fk.get/set
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
#endregion 生成fk.get/set
|
|
275
|
+
}
|
|
276
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
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, "云朵博物馆", "《云朵博物馆》是一个通过解密学习水的三种形态的主题任务。", "宝宝在探索中,成功破解了云朵博物馆的谜题。", "今天的任务重虽然遇到了一些小困难,但整体任务的完成度还是不错的。", "今天的主题任务完成很不错,能够灵活的将所学知识运用。", "今天的主题任务完成非常棒!!!"),
|
|
11
|
+
new 专家评价(1002, "消化道历险记", "", "", "", "", ""),
|
|
12
|
+
new 专家评价(1003, "人体警卫员", "《人体警卫员》是一个由玩家扮演免疫系统指挥官的角色,来了解人体免疫防御机制,学习免疫细胞种类和功能,从而完成布防免疫细胞消灭入侵病毒的主题任务。", "孩子成功找到了四种免疫细胞,了解了它们在人体中的主要分布位置以及功能。完成了5轮病毒入侵的防御任务。了解了人体免疫系统的基本运作机制。", "孩子成功收集到了四种免疫细胞,对人体的免疫系统有了初步的认识,但是未通过最后的任务关卡挑战。建议您后续督促孩子再次进行学习体验。", "孩子成功收集到了四种免疫细胞,并完成了病毒入侵的防御任务,对人体的免疫系统有了较清楚的认识,但是未通过测试环节。希望在后续的课程中再接再厉,细心观察,勇于探索。", "孩子成功收集到了四种免疫细胞,并出色地完成了病毒入侵的防御任务,对人体的免疫系统有了清楚的认识,并且顺利地通过了测试环节。同时在防御病毒的过程中,有清晰的策略和规划,以较低的消耗成功抵御了大量病毒,超过了大多数其他玩家,希望在后续的任务中再接再厉,勇攀高峰。"),
|
|
13
|
+
new 专家评价(2001, "航天服大修理", "", "", "", "", ""),
|
|
14
|
+
new 专家评价(3001, "古籍失窃之谜", "", "", "", "", ""),
|
|
15
|
+
new 专家评价(4001, "block101-动物放生", "", "", "", "", ""),
|
|
16
|
+
new 专家评价(4002, "block101-熊猫救援", "", "", "", "", ""),
|
|
17
|
+
new 专家评价(4003, "block101-稀有矿产", "", "", "", "", ""),
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
public 专家评价() { }
|
|
21
|
+
public 专家评价(int unit_id, string unit_name, string introduction, string description, string star1, string star2, string star3)
|
|
22
|
+
{
|
|
23
|
+
this.UnitId = unit_id;
|
|
24
|
+
this.UnitName = unit_name;
|
|
25
|
+
this.Introduction = introduction;
|
|
26
|
+
this.Description = description;
|
|
27
|
+
this.Star1 = star1;
|
|
28
|
+
this.Star2 = star2;
|
|
29
|
+
this.Star3 = star3;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public virtual 专家评价 MergeFrom(专家评价 source)
|
|
33
|
+
{
|
|
34
|
+
this.UnitId = source.UnitId;
|
|
35
|
+
this.UnitName = source.UnitName;
|
|
36
|
+
this.Introduction = source.Introduction;
|
|
37
|
+
this.Description = source.Description;
|
|
38
|
+
this.Star1 = source.Star1;
|
|
39
|
+
this.Star2 = source.Star2;
|
|
40
|
+
this.Star3 = source.Star3;
|
|
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
|
+
/// unit_id
|
|
54
|
+
/// </summary>
|
|
55
|
+
public int UnitId;
|
|
56
|
+
/// <summary>
|
|
57
|
+
/// 名称
|
|
58
|
+
/// </summary>
|
|
59
|
+
public string UnitName;
|
|
60
|
+
/// <summary>
|
|
61
|
+
/// 主题简介
|
|
62
|
+
/// </summary>
|
|
63
|
+
public string Introduction;
|
|
64
|
+
/// <summary>
|
|
65
|
+
/// 学习行为表现
|
|
66
|
+
/// </summary>
|
|
67
|
+
public string Description;
|
|
68
|
+
/// <summary>
|
|
69
|
+
/// 1星
|
|
70
|
+
/// </summary>
|
|
71
|
+
public string Star1;
|
|
72
|
+
/// <summary>
|
|
73
|
+
/// 2星
|
|
74
|
+
/// </summary>
|
|
75
|
+
public string Star2;
|
|
76
|
+
/// <summary>
|
|
77
|
+
/// 3星
|
|
78
|
+
/// </summary>
|
|
79
|
+
public string Star3;
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
#region get字段
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
#endregion
|
|
91
|
+
|
|
92
|
+
#region uid map
|
|
93
|
+
protected static Dictionary<int, 专家评价> _tempDictByUnitId;
|
|
94
|
+
public static 专家评价 GetConfigByUnitId(int UnitId)
|
|
95
|
+
{
|
|
96
|
+
if (_tempDictByUnitId == null)
|
|
97
|
+
{
|
|
98
|
+
_tempDictByUnitId = new Dictionary<int, 专家评价>();
|
|
99
|
+
Configs.ForEach(c =>
|
|
100
|
+
{
|
|
101
|
+
_tempDictByUnitId.Add(c.UnitId, c);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return _tempDictByUnitId.GetValueOrDefault(UnitId);
|
|
105
|
+
}
|
|
106
|
+
protected static Dictionary<string, 专家评价[]> _tempRecordsDictByUnitName = new Dictionary<string, 专家评价[]>();
|
|
107
|
+
public static 专家评价[] GetConfigsByUnitName(string UnitName)
|
|
108
|
+
{
|
|
109
|
+
if (_tempRecordsDictByUnitName.ContainsKey(UnitName))
|
|
110
|
+
{
|
|
111
|
+
return _tempRecordsDictByUnitName.GetValueOrDefault(UnitName);
|
|
112
|
+
}
|
|
113
|
+
else
|
|
114
|
+
{
|
|
115
|
+
var records = Configs.Where(c => c.UnitName == UnitName).ToArray();
|
|
116
|
+
_tempRecordsDictByUnitName.Add(UnitName, records);
|
|
117
|
+
return records;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
protected static Dictionary<string, 专家评价[]> _tempRecordsDictByIntroduction = new Dictionary<string, 专家评价[]>();
|
|
121
|
+
public static 专家评价[] GetConfigsByIntroduction(string Introduction)
|
|
122
|
+
{
|
|
123
|
+
if (_tempRecordsDictByIntroduction.ContainsKey(Introduction))
|
|
124
|
+
{
|
|
125
|
+
return _tempRecordsDictByIntroduction.GetValueOrDefault(Introduction);
|
|
126
|
+
}
|
|
127
|
+
else
|
|
128
|
+
{
|
|
129
|
+
var records = Configs.Where(c => c.Introduction == Introduction).ToArray();
|
|
130
|
+
_tempRecordsDictByIntroduction.Add(Introduction, records);
|
|
131
|
+
return records;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
protected static Dictionary<string, 专家评价[]> _tempRecordsDictByDescription = new Dictionary<string, 专家评价[]>();
|
|
135
|
+
public static 专家评价[] GetConfigsByDescription(string Description)
|
|
136
|
+
{
|
|
137
|
+
if (_tempRecordsDictByDescription.ContainsKey(Description))
|
|
138
|
+
{
|
|
139
|
+
return _tempRecordsDictByDescription.GetValueOrDefault(Description);
|
|
140
|
+
}
|
|
141
|
+
else
|
|
142
|
+
{
|
|
143
|
+
var records = Configs.Where(c => c.Description == Description).ToArray();
|
|
144
|
+
_tempRecordsDictByDescription.Add(Description, records);
|
|
145
|
+
return records;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
protected static Dictionary<string, 专家评价[]> _tempRecordsDictByStar1 = new Dictionary<string, 专家评价[]>();
|
|
149
|
+
public static 专家评价[] GetConfigsByStar1(string Star1)
|
|
150
|
+
{
|
|
151
|
+
if (_tempRecordsDictByStar1.ContainsKey(Star1))
|
|
152
|
+
{
|
|
153
|
+
return _tempRecordsDictByStar1.GetValueOrDefault(Star1);
|
|
154
|
+
}
|
|
155
|
+
else
|
|
156
|
+
{
|
|
157
|
+
var records = Configs.Where(c => c.Star1 == Star1).ToArray();
|
|
158
|
+
_tempRecordsDictByStar1.Add(Star1, records);
|
|
159
|
+
return records;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
protected static Dictionary<string, 专家评价[]> _tempRecordsDictByStar2 = new Dictionary<string, 专家评价[]>();
|
|
163
|
+
public static 专家评价[] GetConfigsByStar2(string Star2)
|
|
164
|
+
{
|
|
165
|
+
if (_tempRecordsDictByStar2.ContainsKey(Star2))
|
|
166
|
+
{
|
|
167
|
+
return _tempRecordsDictByStar2.GetValueOrDefault(Star2);
|
|
168
|
+
}
|
|
169
|
+
else
|
|
170
|
+
{
|
|
171
|
+
var records = Configs.Where(c => c.Star2 == Star2).ToArray();
|
|
172
|
+
_tempRecordsDictByStar2.Add(Star2, records);
|
|
173
|
+
return records;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
protected static Dictionary<string, 专家评价[]> _tempRecordsDictByStar3 = new Dictionary<string, 专家评价[]>();
|
|
177
|
+
public static 专家评价[] GetConfigsByStar3(string Star3)
|
|
178
|
+
{
|
|
179
|
+
if (_tempRecordsDictByStar3.ContainsKey(Star3))
|
|
180
|
+
{
|
|
181
|
+
return _tempRecordsDictByStar3.GetValueOrDefault(Star3);
|
|
182
|
+
}
|
|
183
|
+
else
|
|
184
|
+
{
|
|
185
|
+
var records = Configs.Where(c => c.Star3 == Star3).ToArray();
|
|
186
|
+
_tempRecordsDictByStar3.Add(Star3, records);
|
|
187
|
+
return records;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
#endregion uid map
|
|
192
|
+
|
|
193
|
+
#region 生成fk.get/set
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
#endregion 生成fk.get/set
|
|
209
|
+
}
|
|
210
|
+
}
|