@cc-component/cc-guide 1.0.7 → 1.0.8
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/assets/guide/guide/GuideCenter.ts +3 -5
- package/assets/guide/guide/model/GuideCommon.ts +4 -2
- package/assets/guide/guide/model/GuideModelComp.ts +8 -0
- package/assets/guide/interface/GuideModule.ts +1 -1
- package/assets/guide/interface/Interface.ts +2 -1
- package/assets/guide/interface/guide/prefab/mask.prefab +1 -1
- package/assets/guide/interface/guide/prefab/prompt.prefab +7 -10
- package/assets/guide/interface/guide.meta +1 -3
- package/package.json +1 -1
- package/assets/guide/interface/guide/prefab/skeleton.atlas +0 -20
- package/assets/guide/interface/guide/prefab/skeleton.atlas.meta +0 -12
- package/assets/guide/interface/guide/prefab/skeleton.json +0 -1
- package/assets/guide/interface/guide/prefab/skeleton.json.meta +0 -13
- package/assets/guide/interface/guide/prefab/skeleton.png +0 -0
- package/assets/guide/interface/guide/prefab/skeleton.png.meta +0 -134
|
@@ -37,7 +37,6 @@ export class GuideCenter {
|
|
|
37
37
|
node: Node;
|
|
38
38
|
/** 资源路径 */
|
|
39
39
|
path: string = "guide/tableJS/";
|
|
40
|
-
bundleName: string = "guide";
|
|
41
40
|
|
|
42
41
|
/** 数据缓存 */
|
|
43
42
|
data: Map<string, any> = new Map();
|
|
@@ -71,7 +70,7 @@ export class GuideCenter {
|
|
|
71
70
|
this.step = step;
|
|
72
71
|
// 引导最大步数(最后步骤引导完后自动释放引导相关资源)
|
|
73
72
|
//this.guide.GuideModel.last = 2;
|
|
74
|
-
this.load(this.bundleName, [this.
|
|
73
|
+
this.load(this.param.bundleName, [this.param.prefabPath], (pro) => {
|
|
75
74
|
// Log.log("加载进度:", pro);
|
|
76
75
|
}).then(async () => {
|
|
77
76
|
//await this.loadDirJsonAsync()
|
|
@@ -89,8 +88,7 @@ export class GuideCenter {
|
|
|
89
88
|
|
|
90
89
|
|
|
91
90
|
getAsset<T>(name: string) {
|
|
92
|
-
return assetManager.getBundle(this.bundleName).get(name) as T;
|
|
93
|
-
|
|
91
|
+
return assetManager.getBundle(this.param.bundleName).get(name) as T;
|
|
94
92
|
}
|
|
95
93
|
/**加载视频 */
|
|
96
94
|
load(bundleName: string, dirs: string[], pro: (pro: number) => void) {
|
|
@@ -357,7 +355,7 @@ export class GuideCenter {
|
|
|
357
355
|
}
|
|
358
356
|
|
|
359
357
|
|
|
360
|
-
spriteRootPath(name: string) { return `${this.param.
|
|
358
|
+
spriteRootPath(name: string) { return `${this.param.spritePath}/${name}` }
|
|
361
359
|
}
|
|
362
360
|
|
|
363
361
|
|
|
@@ -13,8 +13,10 @@ export enum GuideCommon {
|
|
|
13
13
|
export interface IGuideData {
|
|
14
14
|
/**资源bundle-引导 */
|
|
15
15
|
bundleName: string;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**预制体根路径 */
|
|
17
|
+
prefabPath: string;
|
|
18
|
+
/**图片根路径 */
|
|
19
|
+
spritePath: string;
|
|
18
20
|
/**资源表json */
|
|
19
21
|
tableGuide: Map<number, ITableGuide>;
|
|
20
22
|
}
|
|
@@ -87,6 +87,14 @@ export class GuideModelComp {
|
|
|
87
87
|
|
|
88
88
|
loadData(param: IGuideData) {
|
|
89
89
|
this.table = param.tableGuide
|
|
90
|
+
|
|
91
|
+
/** 资源文件夹 */
|
|
92
|
+
this.res_dir = param.prefabPath;
|
|
93
|
+
/** 遮罩预制资源 */
|
|
94
|
+
this.res_mask = `${param.prefabPath}/mask`
|
|
95
|
+
/** 提示预制资源 */
|
|
96
|
+
this.res_prompt = `${param.prefabPath}/prompt`
|
|
97
|
+
|
|
90
98
|
this.prompts.push({ is_week: false, is_finish: false, data: null })
|
|
91
99
|
this.table.forEach((element, key) => {
|
|
92
100
|
const data = { is_week: false, is_finish: key === 2 ? false : false, data: element }
|
|
@@ -8,10 +8,10 @@ import { Log } from "../common/Log";
|
|
|
8
8
|
/**引导模块 */
|
|
9
9
|
class GuideModule {
|
|
10
10
|
static async Init(node: Node, step: number, param: IGuideData) {
|
|
11
|
-
Log.enable(false);
|
|
12
11
|
await GuideSDK.init(node, step, param)
|
|
13
12
|
//await GuideModule.TaskInit(MiddleCenter.GetLayer(LayerType.Task), 0)
|
|
14
13
|
}
|
|
14
|
+
static Debug(enable: boolean) { Log.enable(enable); }
|
|
15
15
|
static Check(step: number) { GuideSDK.check(step); }
|
|
16
16
|
/** 开始指定功能引导组-注意此方法需要更新服务器的步骤 */
|
|
17
17
|
static StartGuideGroup<T>(group_id: number): void { GuideSDK.startGuideGroup(group_id); }
|
|
@@ -28,7 +28,8 @@ declare global {
|
|
|
28
28
|
function OnMessageFinishGroup(call: (groupId: number) => void)
|
|
29
29
|
/**是否引导中 */
|
|
30
30
|
function GuideShow(): boolean;
|
|
31
|
-
|
|
31
|
+
/**开启日志打印 */
|
|
32
|
+
function Debug(enable: boolean)
|
|
32
33
|
//任务
|
|
33
34
|
// const TaskCenter: TaskCenter;
|
|
34
35
|
// function TaskInit(node: Node, step?: number, step_week?: number)
|
|
@@ -672,7 +672,7 @@
|
|
|
672
672
|
"b": 10,
|
|
673
673
|
"a": 255
|
|
674
674
|
},
|
|
675
|
-
"_string": "
|
|
675
|
+
"_string": "角色名",
|
|
676
676
|
"_horizontalAlign": 1,
|
|
677
677
|
"_verticalAlign": 1,
|
|
678
678
|
"_actualFontSize": 36,
|
|
@@ -1003,7 +1003,7 @@
|
|
|
1003
1003
|
"b": 145,
|
|
1004
1004
|
"a": 255
|
|
1005
1005
|
},
|
|
1006
|
-
"_string": "
|
|
1006
|
+
"_string": "文本",
|
|
1007
1007
|
"_horizontalAlign": 0,
|
|
1008
1008
|
"_verticalAlign": 0,
|
|
1009
1009
|
"_actualFontSize": 38,
|
|
@@ -1308,8 +1308,8 @@
|
|
|
1308
1308
|
},
|
|
1309
1309
|
"_contentSize": {
|
|
1310
1310
|
"__type__": "cc.Size",
|
|
1311
|
-
"width":
|
|
1312
|
-
"height":
|
|
1311
|
+
"width": 100,
|
|
1312
|
+
"height": 100
|
|
1313
1313
|
},
|
|
1314
1314
|
"_anchorPoint": {
|
|
1315
1315
|
"__type__": "cc.Vec2",
|
|
@@ -1344,12 +1344,9 @@
|
|
|
1344
1344
|
"b": 255,
|
|
1345
1345
|
"a": 255
|
|
1346
1346
|
},
|
|
1347
|
-
"_skeletonData":
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
},
|
|
1351
|
-
"defaultSkin": "default",
|
|
1352
|
-
"defaultAnimation": "idle",
|
|
1347
|
+
"_skeletonData": null,
|
|
1348
|
+
"defaultSkin": "",
|
|
1349
|
+
"defaultAnimation": "",
|
|
1353
1350
|
"_premultipliedAlpha": true,
|
|
1354
1351
|
"_timeScale": 0.75,
|
|
1355
1352
|
"_preCacheMode": 0,
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
skeleton.png
|
|
3
|
-
size: 231,231
|
|
4
|
-
format: RGBA8888
|
|
5
|
-
filter: Linear,Linear
|
|
6
|
-
repeat: none
|
|
7
|
-
guide_circle_b
|
|
8
|
-
rotate: false
|
|
9
|
-
xy: 2, 69
|
|
10
|
-
size: 160, 160
|
|
11
|
-
orig: 160, 160
|
|
12
|
-
offset: 0, 0
|
|
13
|
-
index: -1
|
|
14
|
-
guide_hand
|
|
15
|
-
rotate: false
|
|
16
|
-
xy: 2, 2
|
|
17
|
-
size: 67, 65
|
|
18
|
-
orig: 68, 68
|
|
19
|
-
offset: 1, 0
|
|
20
|
-
index: -1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"skeleton":{"hash":"xKe3zNwGjXsLX0Yz3VA3CZB5QOE","spine":"3.8.84","x":-160,"y":-160,"width":320,"height":320,"images":"./images/","audio":""},"bones":[{"name":"root"},{"name":"bone","parent":"root","length":141.44},{"name":"bone2","parent":"bone","length":33.63,"rotation":145.53,"x":99.22,"y":-94.67},{"name":"bone3","parent":"bone2","length":59.7,"rotation":-25.54,"x":33.63},{"name":"bone4","parent":"bone3","length":20.23,"rotation":0.74,"x":72.33,"y":22.83},{"name":"bone5","parent":"bone4","length":12.51,"rotation":-5.13,"x":20.23},{"name":"bone6","parent":"bone3","length":23.63,"rotation":35.63,"x":33.77,"y":42.79},{"name":"bone7","parent":"bone"},{"name":"bone8","parent":"root","length":233.57,"rotation":90}],"slots":[{"name":"guide_circle_b","bone":"bone8","attachment":"guide_circle_b"},{"name":"guide_hand","bone":"root","attachment":"guide_hand"}],"skins":[{"name":"default","attachments":{"guide_circle_b":{"guide_circle_b":{"rotation":-90,"width":320,"height":320}},"guide_hand":{"guide_hand":{"type":"mesh","uvs":[0.43171,0.96723,0.14312,0.80076,0.02665,0.68429,0.07165,0.57312,0.21988,0.52679,0.16995,0.45891,0.12723,0.38518,0.08223,0.30312,0.05709,0.21444,0.06503,0.13768,0.13253,0.05429,0.21856,0.05694,0.28473,0.10988,0.34165,0.21576,0.45153,0.2602,0.59951,0.24583,0.78469,0.29656,0.89753,0.39444,0.96779,0.55001,1,0.76503,1,0.88282,0.9015,1,0.75591,1,0.27812,0.87753,0.32047,0.60722],"triangles":[2,3,1,1,3,4,13,7,12,12,7,11,9,10,11,11,7,8,9,11,8,5,13,14,5,6,13,6,7,13,4,5,14,1,23,0,23,1,24,1,4,24,0,23,17,17,23,24,24,4,15,0,17,18,17,24,16,24,15,16,4,14,15,18,19,22,21,22,20,20,22,19,22,0,18],"vertices":[2,2,47.84,45.86,0.536,3,-6.95,47.5,0.464,3,2,93.01,49.41,7.0E-4,3,32.28,70.18,0.488,6,14.75,23.13,0.5113,1,6,35.71,15.24,1,2,4,-7.86,40.4,0.00104,6,36.37,-1.06,0.99896,2,3,59.33,42.51,0.28,6,20.61,-15.12,0.72,4,3,70.72,43.77,2.0E-4,4,-1.34,20.97,0.83169,5,-23.36,18.95,0.0051,6,30.6,-20.73,0.16301,3,4,10.25,20.83,0.87101,5,-11.81,19.86,0.09649,6,40.03,-27.46,0.0325,3,4,22.97,20.39,0.56993,5,0.9,20.55,0.4289,6,50.21,-35.1,0.00117,2,4,35.08,17.17,0.19548,5,13.26,18.43,0.80452,2,4,43.51,10.9,0.03594,5,22.21,12.94,0.96406,1,5,28.46,-0.24,1,1,5,23.08,-10.63,1,3,3,104.03,6.52,0.00411,4,31.48,-16.71,0.075,5,12.7,-15.64,0.9209,3,3,87.69,7.02,0.12594,4,15.15,-16,0.65399,5,-3.63,-16.4,0.22007,3,3,74.98,-2.9,0.7038,4,2.32,-25.76,0.2946,5,-15.54,-27.26,0.00161,1,3,66.61,-21.31,1,1,3,48.05,-39.67,1,1,3,28.84,-46.31,1,2,2,19.85,-42.18,0.536,3,5.74,-44.01,0.464,1,2,-0.31,-20.55,1,1,2,-9.38,-7.35,1,1,2,-7.35,13.37,1,1,2,8.97,24.58,1,1,3,14.06,59.5,1,2,3,43.02,36.13,0.8,6,3.64,-10.8,0.2],"hull":23,"edges":[10,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,42,44,0,36,44,0,0,46,46,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,0,2,34,46,8,48,48,32,8,30],"width":136,"height":136}}}}],"animations":{"idle":{"bones":{"bone8":{"rotate":[{},{"time":0.3333,"angle":120},{"time":0.6667,"angle":-120},{"time":1},{"time":1.3333,"angle":120},{"time":1.6667,"angle":-120},{"time":2}],"scale":[{"curve":0.25,"c3":0.75},{"time":0.5,"x":1.1,"y":1.1,"curve":0.25,"c3":0.75},{"time":1,"curve":0.25,"c3":0.75},{"time":1.5,"x":1.1,"y":1.1,"curve":0.25,"c3":0.75},{"time":2}]},"bone7":{"scale":[{"curve":0.25,"c3":0.75},{"time":0.2333,"x":1.2,"y":1.2,"curve":0.25,"c3":0.75},{"time":0.4333,"curve":0.25,"c3":0.75},{"time":0.6667,"x":1.2,"y":1.2,"curve":0.25,"c3":0.75},{"time":0.9,"curve":0.25,"c3":0.75},{"time":1.1,"x":1.2,"y":1.2,"curve":0.25,"c3":0.75},{"time":1.3333}]},"bone2":{"translate":[{"x":10.92,"y":2.3,"curve":0.25,"c3":0.75},{"time":0.5,"x":5.66,"y":1.99,"curve":0.25,"c3":0.75},{"time":1,"x":10.92,"y":2.3,"curve":0.25,"c3":0.75},{"time":1.5,"x":5.66,"y":1.99,"curve":0.25,"c3":0.75},{"time":2,"x":10.92,"y":2.3}]},"bone3":{"rotate":[{"angle":-0.21,"curve":0.371,"c2":0.62,"c3":0.71},{"time":0.1,"angle":-1.11,"curve":0.25,"c3":0.75},{"time":0.6,"angle":8.21,"curve":0.243,"c3":0.689,"c4":0.75},{"time":1,"angle":-0.21,"curve":0.371,"c2":0.62,"c3":0.71},{"time":1.1,"angle":-1.11,"curve":0.25,"c3":0.75},{"time":1.6,"angle":8.21,"curve":0.243,"c3":0.689,"c4":0.75},{"time":2,"angle":-0.21}]},"bone4":{"rotate":[{"angle":-2.34,"curve":0.382,"c2":0.57,"c3":0.735},{"time":0.1667,"angle":-5.18,"curve":0.25,"c3":0.75},{"time":0.6667,"angle":4.81,"curve":0.243,"c3":0.649,"c4":0.6},{"time":1,"angle":-2.34,"curve":0.382,"c2":0.57,"c3":0.735},{"time":1.1667,"angle":-5.18,"curve":0.25,"c3":0.75},{"time":1.6667,"angle":4.81,"curve":0.243,"c3":0.649,"c4":0.6},{"time":2,"angle":-2.34}]},"bone5":{"rotate":[{"angle":-4.96,"curve":0.375,"c2":0.5,"c3":0.75},{"time":0.2667,"angle":-19.58,"curve":0.25,"c3":0.75},{"time":0.7667,"angle":9.65,"curve":0.25,"c3":0.625,"c4":0.5},{"time":1,"angle":-4.96,"curve":0.375,"c2":0.5,"c3":0.75},{"time":1.2667,"angle":-19.58,"curve":0.25,"c3":0.75},{"time":1.7667,"angle":9.65,"curve":0.25,"c3":0.625,"c4":0.5},{"time":2,"angle":-4.96}]},"bone6":{"rotate":[{"angle":-1.56,"curve":0.375,"c2":0.5,"c3":0.75},{"time":0.2667,"angle":-5.94,"curve":0.25,"c3":0.75},{"time":0.7667,"angle":2.82,"curve":0.25,"c3":0.625,"c4":0.5},{"time":1,"angle":-1.56,"curve":0.375,"c2":0.5,"c3":0.75},{"time":1.2667,"angle":-5.94,"curve":0.25,"c3":0.75},{"time":1.7667,"angle":2.82,"curve":0.25,"c3":0.625,"c4":0.5},{"time":2,"angle":-1.56}]}}}}}
|
|
Binary file
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"ver": "1.0.27",
|
|
3
|
-
"importer": "image",
|
|
4
|
-
"imported": true,
|
|
5
|
-
"uuid": "a0a94430-6739-4c1a-9228-aaf29af7fdd4",
|
|
6
|
-
"files": [
|
|
7
|
-
".json",
|
|
8
|
-
".png"
|
|
9
|
-
],
|
|
10
|
-
"subMetas": {
|
|
11
|
-
"6c48a": {
|
|
12
|
-
"importer": "texture",
|
|
13
|
-
"uuid": "a0a94430-6739-4c1a-9228-aaf29af7fdd4@6c48a",
|
|
14
|
-
"displayName": "skeleton",
|
|
15
|
-
"id": "6c48a",
|
|
16
|
-
"name": "texture",
|
|
17
|
-
"userData": {
|
|
18
|
-
"wrapModeS": "clamp-to-edge",
|
|
19
|
-
"wrapModeT": "clamp-to-edge",
|
|
20
|
-
"imageUuidOrDatabaseUri": "a0a94430-6739-4c1a-9228-aaf29af7fdd4",
|
|
21
|
-
"isUuid": true,
|
|
22
|
-
"visible": false,
|
|
23
|
-
"minfilter": "linear",
|
|
24
|
-
"magfilter": "linear",
|
|
25
|
-
"mipfilter": "none",
|
|
26
|
-
"anisotropy": 0
|
|
27
|
-
},
|
|
28
|
-
"ver": "1.0.22",
|
|
29
|
-
"imported": true,
|
|
30
|
-
"files": [
|
|
31
|
-
".json"
|
|
32
|
-
],
|
|
33
|
-
"subMetas": {}
|
|
34
|
-
},
|
|
35
|
-
"f9941": {
|
|
36
|
-
"importer": "sprite-frame",
|
|
37
|
-
"uuid": "a0a94430-6739-4c1a-9228-aaf29af7fdd4@f9941",
|
|
38
|
-
"displayName": "skeleton",
|
|
39
|
-
"id": "f9941",
|
|
40
|
-
"name": "spriteFrame",
|
|
41
|
-
"userData": {
|
|
42
|
-
"trimThreshold": 1,
|
|
43
|
-
"rotated": false,
|
|
44
|
-
"offsetX": -33.5,
|
|
45
|
-
"offsetY": 0,
|
|
46
|
-
"trimX": 2,
|
|
47
|
-
"trimY": 2,
|
|
48
|
-
"width": 160,
|
|
49
|
-
"height": 227,
|
|
50
|
-
"rawWidth": 231,
|
|
51
|
-
"rawHeight": 231,
|
|
52
|
-
"borderTop": 0,
|
|
53
|
-
"borderBottom": 0,
|
|
54
|
-
"borderLeft": 0,
|
|
55
|
-
"borderRight": 0,
|
|
56
|
-
"packable": true,
|
|
57
|
-
"pixelsToUnit": 100,
|
|
58
|
-
"pivotX": 0.5,
|
|
59
|
-
"pivotY": 0.5,
|
|
60
|
-
"meshType": 0,
|
|
61
|
-
"vertices": {
|
|
62
|
-
"rawPosition": [
|
|
63
|
-
-80,
|
|
64
|
-
-113.5,
|
|
65
|
-
0,
|
|
66
|
-
80,
|
|
67
|
-
-113.5,
|
|
68
|
-
0,
|
|
69
|
-
-80,
|
|
70
|
-
113.5,
|
|
71
|
-
0,
|
|
72
|
-
80,
|
|
73
|
-
113.5,
|
|
74
|
-
0
|
|
75
|
-
],
|
|
76
|
-
"indexes": [
|
|
77
|
-
0,
|
|
78
|
-
1,
|
|
79
|
-
2,
|
|
80
|
-
2,
|
|
81
|
-
1,
|
|
82
|
-
3
|
|
83
|
-
],
|
|
84
|
-
"uv": [
|
|
85
|
-
2,
|
|
86
|
-
229,
|
|
87
|
-
162,
|
|
88
|
-
229,
|
|
89
|
-
2,
|
|
90
|
-
2,
|
|
91
|
-
162,
|
|
92
|
-
2
|
|
93
|
-
],
|
|
94
|
-
"nuv": [
|
|
95
|
-
0.008658008658008658,
|
|
96
|
-
0.008658008658008658,
|
|
97
|
-
0.7012987012987013,
|
|
98
|
-
0.008658008658008658,
|
|
99
|
-
0.008658008658008658,
|
|
100
|
-
0.9913419913419913,
|
|
101
|
-
0.7012987012987013,
|
|
102
|
-
0.9913419913419913
|
|
103
|
-
],
|
|
104
|
-
"minPos": [
|
|
105
|
-
-80,
|
|
106
|
-
-113.5,
|
|
107
|
-
0
|
|
108
|
-
],
|
|
109
|
-
"maxPos": [
|
|
110
|
-
80,
|
|
111
|
-
113.5,
|
|
112
|
-
0
|
|
113
|
-
]
|
|
114
|
-
},
|
|
115
|
-
"isUuid": true,
|
|
116
|
-
"imageUuidOrDatabaseUri": "a0a94430-6739-4c1a-9228-aaf29af7fdd4@6c48a",
|
|
117
|
-
"atlasUuid": "",
|
|
118
|
-
"trimType": "auto"
|
|
119
|
-
},
|
|
120
|
-
"ver": "1.0.12",
|
|
121
|
-
"imported": true,
|
|
122
|
-
"files": [
|
|
123
|
-
".json"
|
|
124
|
-
],
|
|
125
|
-
"subMetas": {}
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
"userData": {
|
|
129
|
-
"type": "sprite-frame",
|
|
130
|
-
"hasAlpha": true,
|
|
131
|
-
"fixAlphaTransparencyArtifacts": false,
|
|
132
|
-
"redirect": "a0a94430-6739-4c1a-9228-aaf29af7fdd4@6c48a"
|
|
133
|
-
}
|
|
134
|
-
}
|