Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dap-hu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Gia Vương
dap-hu
Commits
6e6b468c
Commit
6e6b468c
authored
Mar 31, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update main logic, hide hammer when show card
parent
22254b11
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
161 additions
and
274 deletions
+161
-274
main.fire
assets/main.fire
+139
-260
BuaController.ts
assets/scripts/GamePlay/BuaController.ts
+8
-4
HuController.ts
assets/scripts/GamePlay/HuController.ts
+5
-7
ActionScreen.ts
assets/scripts/UI/ActionScreen.ts
+7
-2
CardPopup.ts
assets/scripts/UI/CardPopup.ts
+2
-1
No files found.
assets/main.fire
View file @
6e6b468c
...
...
@@ -78,28 +78,28 @@
"__id__": 11
},
{
"__id__": 5
5
"__id__": 5
2
},
{
"__id__": 6
4
"__id__": 6
1
},
{
"__id__": 2
7
"__id__": 2
4
},
{
"__id__": 6
6
"__id__": 6
3
},
{
"__id__": 7
9
"__id__": 7
6
}
],
"_active": true,
"_components": [
{
"__id__": 8
3
"__id__": 8
0
},
{
"__id__": 8
4
"__id__": 8
1
}
],
"_prefab": null,
...
...
@@ -538,15 +538,12 @@
},
{
"__id__": 15
},
{
"__id__": 18
}
],
"_active": true,
"_components": [
{
"__id__": 2
5
"__id__": 2
2
}
],
"_prefab": null,
...
...
@@ -597,124 +594,6 @@
"groupIndex": 0,
"_id": "b7S+1yVWdOVpUbhfVUW5pm"
},
{
"__type__": "cc.Node",
"_name": "hu-old",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 13
},
{
"__id__": 14
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1080,
"height": 1920
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
18.083,
100,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a1cvtw1qhIDr/2EJIt0sL8"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_materials": [
{
"__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3"
}
],
"paused": false,
"defaultSkin": "default",
"defaultAnimation": "",
"_preCacheMode": 0,
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_skeletonCache": null,
"_animationName": "",
"_animationQueue": [],
"_headAniInfo": null,
"_playTimes": 0,
"_isAniComplete": true,
"_N$skeletonData": {
"__uuid__": "5642aaa9-3574-4d72-b579-98c42b029375"
},
"_N$_defaultCacheMode": 0,
"_N$debugSlots": false,
"_N$debugBones": false,
"_N$debugMesh": false,
"_N$useTint": false,
"_N$enableBatch": false,
"_id": "38uz79AhVAAICrmmI0C6r6"
},
{
"__type__": "ba0b5Nq4fNP4KvnrykIXx3T",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"text": null,
"_id": "38z0bMJaVM5a4LWQUt9f2c"
},
{
"__type__": "cc.Node",
"_name": "hu-3s",
...
...
@@ -726,10 +605,10 @@
"_active": true,
"_components": [
{
"__id__": 1
6
"__id__": 1
3
},
{
"__id__": 1
7
"__id__": 1
4
}
],
"_prefab": null,
...
...
@@ -785,7 +664,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
5
"__id__": 1
2
},
"_enabled": true,
"text": {
...
...
@@ -798,7 +677,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
5
"__id__": 1
2
},
"_enabled": true,
"_materials": [
...
...
@@ -844,13 +723,13 @@
},
"_children": [
{
"__id__": 1
9
"__id__": 1
6
}
],
"_active": true,
"_components": [
{
"__id__": 2
4
"__id__": 2
1
}
],
"_prefab": null,
...
...
@@ -906,20 +785,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 1
8
"__id__": 1
5
},
"_children": [
{
"__id__":
20
"__id__":
17
}
],
"_active": true,
"_components": [
{
"__id__":
22
"__id__":
19
},
{
"__id__": 2
3
"__id__": 2
0
}
],
"_prefab": null,
...
...
@@ -946,7 +825,7 @@
"ctor": "Float64Array",
"array": [
0,
0,
-2
0,
0,
0,
0,
...
...
@@ -975,13 +854,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 1
9
"__id__": 1
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
21
"__id__":
18
}
],
"_prefab": null,
...
...
@@ -1037,7 +916,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
20
"__id__":
17
},
"_enabled": true,
"_materials": [
...
...
@@ -1070,7 +949,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
9
"__id__": 1
6
},
"_enabled": true,
"_materials": [
...
...
@@ -1102,7 +981,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
9
"__id__": 1
6
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1110,8 +989,8 @@
"_alignFlags": 45,
"_left": -25,
"_right": -25,
"_top": -
2
5,
"_bottom": -
2
5,
"_top": -5,
"_bottom": -
4
5,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
...
...
@@ -1129,7 +1008,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
8
"__id__": 1
5
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -1202,7 +1081,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 1
9
"__id__": 1
6
},
"_id": "009jyGf0JGyaWytJquX/r/"
},
...
...
@@ -1215,13 +1094,13 @@
},
"_enabled": true,
"selectBtnNode": {
"__id__": 1
8
"__id__": 1
5
},
"contentNode": {
"__id__": 2
6
"__id__": 2
3
},
"checkedNode": {
"__id__": 3
4
"__id__": 3
1
},
"_id": "12WntYtI5C+bsPwyWnA236"
},
...
...
@@ -1230,29 +1109,29 @@
"_name": "Conttent",
"_objFlags": 0,
"_parent": {
"__id__": 2
7
"__id__": 2
4
},
"_children": [
{
"__id__": 4
5
"__id__": 4
2
},
{
"__id__": 4
7
"__id__": 4
4
},
{
"__id__": 4
9
"__id__": 4
6
},
{
"__id__":
51
"__id__":
48
}
],
"_active": true,
"_components": [
{
"__id__": 5
3
"__id__": 5
0
},
{
"__id__": 5
4
"__id__": 5
1
}
],
"_prefab": null,
...
...
@@ -1312,31 +1191,31 @@
},
"_children": [
{
"__id__": 2
8
"__id__": 2
5
},
{
"__id__":
30
"__id__":
27
},
{
"__id__":
32
"__id__":
29
},
{
"__id__": 2
6
"__id__": 2
3
},
{
"__id__": 3
4
"__id__": 3
1
},
{
"__id__": 3
6
"__id__": 3
3
}
],
"_active": true,
"_components": [
{
"__id__": 4
3
"__id__": 4
0
},
{
"__id__": 4
4
"__id__": 4
1
}
],
"_prefab": null,
...
...
@@ -1392,13 +1271,13 @@
"_name": "Mask",
"_objFlags": 0,
"_parent": {
"__id__": 2
7
"__id__": 2
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
9
"__id__": 2
6
}
],
"_prefab": null,
...
...
@@ -1454,7 +1333,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
8
"__id__": 2
5
},
"_enabled": true,
"_materials": [
...
...
@@ -1486,13 +1365,13 @@
"_name": "BG",
"_objFlags": 0,
"_parent": {
"__id__": 2
7
"__id__": 2
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
31
"__id__":
28
}
],
"_prefab": null,
...
...
@@ -1548,7 +1427,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
30
"__id__":
27
},
"_enabled": true,
"_materials": [
...
...
@@ -1580,13 +1459,13 @@
"_name": "Title",
"_objFlags": 0,
"_parent": {
"__id__": 2
7
"__id__": 2
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
3
"__id__": 3
0
}
],
"_prefab": null,
...
...
@@ -1642,7 +1521,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
32
"__id__":
29
},
"_enabled": true,
"_materials": [
...
...
@@ -1675,13 +1554,13 @@
"_name": "Checked",
"_objFlags": 0,
"_parent": {
"__id__": 2
7
"__id__": 2
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
5
"__id__": 3
2
}
],
"_prefab": null,
...
...
@@ -1737,7 +1616,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
4
"__id__": 3
1
},
"_enabled": true,
"_materials": [
...
...
@@ -1769,17 +1648,17 @@
"_name": "OkButton",
"_objFlags": 0,
"_parent": {
"__id__": 2
7
"__id__": 2
4
},
"_children": [
{
"__id__": 3
7
"__id__": 3
4
}
],
"_active": true,
"_components": [
{
"__id__":
42
"__id__":
39
}
],
"_prefab": null,
...
...
@@ -1835,20 +1714,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 3
6
"__id__": 3
3
},
"_children": [
{
"__id__": 3
8
"__id__": 3
5
}
],
"_active": true,
"_components": [
{
"__id__":
40
"__id__":
37
},
{
"__id__":
41
"__id__":
38
}
],
"_prefab": null,
...
...
@@ -1904,13 +1783,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 3
7
"__id__": 3
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
9
"__id__": 3
6
}
],
"_prefab": null,
...
...
@@ -1966,7 +1845,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
8
"__id__": 3
5
},
"_enabled": true,
"_materials": [
...
...
@@ -1999,7 +1878,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
7
"__id__": 3
4
},
"_enabled": true,
"_materials": [
...
...
@@ -2031,7 +1910,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
7
"__id__": 3
4
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -2058,7 +1937,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
6
"__id__": 3
3
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -2131,7 +2010,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 3
7
"__id__": 3
4
},
"_id": "e8Z5R1m9xLJZ0M9KGeyDSC"
},
...
...
@@ -2140,7 +2019,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
7
"__id__": 2
4
},
"_enabled": true,
"_id": "f1aq5xMrVN341tWAhOykW0"
...
...
@@ -2150,7 +2029,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
7
"__id__": 2
4
},
"_enabled": true,
"_id": "69dYJ1wBlP5Z6QRZCRykh8"
...
...
@@ -2160,13 +2039,13 @@
"_name": "Bua",
"_objFlags": 0,
"_parent": {
"__id__": 2
6
"__id__": 2
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
6
"__id__": 4
3
}
],
"_prefab": null,
...
...
@@ -2222,7 +2101,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
5
"__id__": 4
2
},
"_enabled": true,
"_materials": [
...
...
@@ -2264,13 +2143,13 @@
"_name": "ga",
"_objFlags": 0,
"_parent": {
"__id__": 2
6
"__id__": 2
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
8
"__id__": 4
5
}
],
"_prefab": null,
...
...
@@ -2326,7 +2205,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
7
"__id__": 4
4
},
"_enabled": true,
"_materials": [
...
...
@@ -2368,13 +2247,13 @@
"_name": "gai lung",
"_objFlags": 0,
"_parent": {
"__id__": 2
6
"__id__": 2
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
50
"__id__":
47
}
],
"_prefab": null,
...
...
@@ -2430,7 +2309,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
9
"__id__": 4
6
},
"_enabled": true,
"_materials": [
...
...
@@ -2472,13 +2351,13 @@
"_name": "gay",
"_objFlags": 0,
"_parent": {
"__id__": 2
6
"__id__": 2
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
52
"__id__":
49
}
],
"_prefab": null,
...
...
@@ -2534,7 +2413,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
51
"__id__":
48
},
"_enabled": true,
"_materials": [
...
...
@@ -2576,7 +2455,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
6
"__id__": 2
3
},
"_enabled": false,
"_materials": [
...
...
@@ -2608,7 +2487,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
6
"__id__": 2
3
},
"_enabled": true,
"_layoutSize": {
...
...
@@ -2644,16 +2523,16 @@
},
"_children": [
{
"__id__": 5
6
"__id__": 5
3
},
{
"__id__": 5
9
"__id__": 5
6
}
],
"_active": true,
"_components": [
{
"__id__": 6
3
"__id__": 6
0
}
],
"_prefab": null,
...
...
@@ -2709,16 +2588,16 @@
"_name": "Chum",
"_objFlags": 0,
"_parent": {
"__id__": 5
5
"__id__": 5
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
7
"__id__": 5
4
},
{
"__id__": 5
8
"__id__": 5
5
}
],
"_prefab": null,
...
...
@@ -2774,7 +2653,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
6
"__id__": 5
3
},
"_enabled": true,
"_materials": [
...
...
@@ -2816,7 +2695,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
6
"__id__": 5
3
},
"_enabled": true,
"_id": "32Nb7fXTdNIYe2FGNiHQD8"
...
...
@@ -2826,11 +2705,11 @@
"_name": "buaPos",
"_objFlags": 0,
"_parent": {
"__id__": 5
5
"__id__": 5
2
},
"_children": [
{
"__id__":
60
"__id__":
57
}
],
"_active": true,
...
...
@@ -2888,16 +2767,16 @@
"_name": "Bua",
"_objFlags": 0,
"_parent": {
"__id__": 5
9
"__id__": 5
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
61
"__id__":
58
},
{
"__id__":
62
"__id__":
59
}
],
"_prefab": null,
...
...
@@ -2953,11 +2832,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
60
"__id__":
57
},
"_enabled": true,
"chumNode": {
"__id__": 5
6
"__id__": 5
3
},
"_id": "de4Eqj7wlDIqqcvtH5WY/o"
},
...
...
@@ -2966,7 +2845,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
60
"__id__":
57
},
"_enabled": true,
"_materials": [
...
...
@@ -3008,7 +2887,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
5
"__id__": 5
2
},
"_enabled": true,
"_id": "45yzC1EPtJP4Z8W/DF1iwD"
...
...
@@ -3024,7 +2903,7 @@
"_active": false,
"_components": [
{
"__id__": 6
5
"__id__": 6
2
}
],
"_prefab": null,
...
...
@@ -3080,7 +2959,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
4
"__id__": 6
1
},
"_enabled": true,
"_id": "96hHP+ssxLNpn8/i2AKAyI"
...
...
@@ -3094,19 +2973,19 @@
},
"_children": [
{
"__id__": 6
7
"__id__": 6
4
},
{
"__id__":
70
"__id__":
67
}
],
"_active": true,
"_components": [
{
"__id__": 7
7
"__id__": 7
4
},
{
"__id__": 7
8
"__id__": 7
5
}
],
"_prefab": null,
...
...
@@ -3162,16 +3041,16 @@
"_name": "The",
"_objFlags": 0,
"_parent": {
"__id__": 6
6
"__id__": 6
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
8
"__id__": 6
5
},
{
"__id__": 6
9
"__id__": 6
6
}
],
"_prefab": null,
...
...
@@ -3227,7 +3106,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
7
"__id__": 6
4
},
"_enabled": true,
"_materials": [
...
...
@@ -3269,7 +3148,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
7
"__id__": 6
4
},
"_enabled": true,
"_id": "8aU9CpQKRFmJMSMUCpaItu"
...
...
@@ -3279,17 +3158,17 @@
"_name": "Replay Button",
"_objFlags": 0,
"_parent": {
"__id__": 6
6
"__id__": 6
3
},
"_children": [
{
"__id__":
71
"__id__":
68
}
],
"_active": true,
"_components": [
{
"__id__": 7
6
"__id__": 7
3
}
],
"_prefab": null,
...
...
@@ -3345,20 +3224,20 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__":
70
"__id__":
67
},
"_children": [
{
"__id__":
72
"__id__":
69
}
],
"_active": true,
"_components": [
{
"__id__": 7
4
"__id__": 7
1
},
{
"__id__": 7
5
"__id__": 7
2
}
],
"_prefab": null,
...
...
@@ -3414,13 +3293,13 @@
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__":
71
"__id__":
68
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
3
"__id__": 7
0
}
],
"_prefab": null,
...
...
@@ -3476,7 +3355,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
72
"__id__":
69
},
"_enabled": true,
"_materials": [
...
...
@@ -3509,7 +3388,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
71
"__id__":
68
},
"_enabled": true,
"_materials": [
...
...
@@ -3541,7 +3420,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
71
"__id__":
68
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -3568,7 +3447,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
70
"__id__":
67
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3641,7 +3520,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__":
71
"__id__":
68
},
"_id": "adCMRaOEVD5LOjd7MAm9EO"
},
...
...
@@ -3650,7 +3529,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
6
"__id__": 6
3
},
"_enabled": true,
"_id": "bcaw0ZNyRPGoK8ATotq1yF"
...
...
@@ -3660,7 +3539,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
6
"__id__": 6
3
},
"_enabled": true,
"_id": "17J7OqMb1NsbF4iJiNTrDS"
...
...
@@ -3674,13 +3553,13 @@
},
"_children": [
{
"__id__":
80
"__id__":
77
}
],
"_active": true,
"_components": [
{
"__id__":
82
"__id__":
79
}
],
"_prefab": null,
...
...
@@ -3736,13 +3615,13 @@
"_name": "beer-bottle-rolling-on-a-sidewalk-82234",
"_objFlags": 0,
"_parent": {
"__id__": 7
9
"__id__": 7
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
81
"__id__":
78
}
],
"_prefab": null,
...
...
@@ -3798,7 +3677,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
80
"__id__":
77
},
"_enabled": true,
"_clip": {
...
...
@@ -3817,11 +3696,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
9
"__id__": 7
6
},
"_enabled": true,
"rollingSound": {
"__id__":
81
"__id__":
78
},
"_id": "a5vu6IE1ROn6VO7UPM9J3p"
},
...
...
assets/scripts/GamePlay/BuaController.ts
View file @
6e6b468c
...
...
@@ -27,7 +27,8 @@ export default class BuaController extends cc.Component {
}
public
onSetTool
()
{
this
.
spine
.
setSkin
(
this
.
_skins
[
Global
.
tool
%
this
.
_skins
.
length
])
this
.
spine
.
setSkin
(
this
.
_skins
[
Global
.
tool
%
this
.
_skins
.
length
]);
this
.
node
.
position
=
cc
.
v3
(
0
,
0
,
0
);
}
private
onTouchStart
():
void
{
...
...
@@ -62,9 +63,12 @@ export default class BuaController extends cc.Component {
this
.
playSound
();
this
.
_chumCtrl
.
playAnimationNut4
();
this
.
scheduleOnce
(()
=>
{
eventTarget
.
emit
(
SHOW_CARD_POPUP
);
},
0.5
)
cc
.
tween
(
this
.
node
)
.
by
(
0.5
,
{
position
:
cc
.
v3
(
300
,)
})
.
call
(()
=>
{
eventTarget
.
emit
(
SHOW_CARD_POPUP
);
})
.
start
();
}
private
playSound
()
{
...
...
assets/scripts/GamePlay/HuController.ts
View file @
6e6b468c
...
...
@@ -28,20 +28,18 @@ export default class HuController extends cc.Component {
}
protected
start
():
void
{
this
.
scheduleOnce
(()
=>
this
.
testDevice
,
1
);
console
.
log
(
'testDevice'
,)
this
.
scheduleOnce
(()
=>
this
.
testDevice
,
3
);
}
private
testDevice
()
{
this
.
text
.
string
=
'testDevice'
;
console
.
log
(
'testDevice'
,)
window
.
addEventListener
(
"devicemotion"
,
(
event
)
=>
{
if
(
!
event
.
accelerationIncludingGravity
)
{
return
;
}
this
.
text
.
string
=
`
x:
${
event
.
accelerationIncludingGravity
.
x
}
,
y:
${
event
.
accelerationIncludingGravity
.
y
}
,
z:
${
event
.
accelerationIncludingGravity
.
z
}
`
;
this
.
text
.
string
=
`lac`
;
const
x
=
event
.
accelerationIncludingGravity
.
x
;
const
y
=
event
.
accelerationIncludingGravity
.
y
;
const
z
=
event
.
accelerationIncludingGravity
.
z
;
...
...
assets/scripts/UI/ActionScreen.ts
View file @
6e6b468c
import
{
eventTarget
,
SHOW_ACTION_SCREEN
,
SHOW_CARD_POPUP
}
from
"../Events"
;
import
{
eventTarget
,
SHOW_ACTION_SCREEN
,
SHOW_CARD_POPUP
,
SHOW_START_SCREEN
}
from
"../Events"
;
import
BuaController
from
"../GamePlay/BuaController"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
...
@@ -11,7 +11,8 @@ export default class ActionScreen extends cc.Component {
onLoad
()
{
this
.
node
.
position
=
cc
.
v3
();
this
.
node
.
active
=
false
;
eventTarget
.
on
(
SHOW_ACTION_SCREEN
,
this
.
showScreen
,
this
);
eventTarget
.
on
(
SHOW_ACTION_SCREEN
,
this
.
showScreen
,
this
);
eventTarget
.
on
(
SHOW_START_SCREEN
,
this
.
hideScreen
,
this
);
this
.
_buaController
=
this
.
getComponentInChildren
(
BuaController
);
}
...
...
@@ -20,4 +21,8 @@ export default class ActionScreen extends cc.Component {
this
.
_buaController
.
onSetTool
();
}
private
hideScreen
()
{
this
.
node
.
active
=
false
;
}
}
assets/scripts/UI/CardPopup.ts
View file @
6e6b468c
import
{
eventTarget
,
SHOW_CARD_POPUP
,
STOP_ANIM_CHUM
}
from
"../Events"
;
import
{
eventTarget
,
SHOW_CARD_POPUP
,
S
HOW_START_SCREEN
,
S
TOP_ANIM_CHUM
}
from
"../Events"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
...
@@ -25,6 +25,7 @@ export default class CardPopup extends cc.Component {
private
onReplayBtnClick
()
{
this
.
node
.
active
=
false
;
eventTarget
.
emit
(
SHOW_START_SCREEN
);
eventTarget
.
emit
(
STOP_ANIM_CHUM
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment