Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_07
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
JJ_Game_07
Commits
37c22dc6
Commit
37c22dc6
authored
Aug 23, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加返回按钮
parent
a8216324
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
390 additions
and
88 deletions
+390
-88
JJ_Game_07.fire
assets/JJ_Game_07/scene/JJ_Game_07.fire
+313
-88
BtnBack_JJ_Game_07.ts
assets/JJ_Game_07/script/BtnBack_JJ_Game_07.ts
+32
-0
BtnBack_JJ_Game_07.ts.meta
assets/JJ_Game_07/script/BtnBack_JJ_Game_07.ts.meta
+9
-0
btn_return.png
assets/JJ_Game_07/textures/btn_return.png
+0
-0
btn_return.png.meta
assets/JJ_Game_07/textures/btn_return.png.meta
+36
-0
No files found.
assets/JJ_Game_07/scene/JJ_Game_07.fire
View file @
37c22dc6
...
...
@@ -17,16 +17,16 @@
"__id__": 2
},
{
"__id__": 1
64
"__id__": 1
70
},
{
"__id__": 1
77
"__id__": 1
83
},
{
"__id__": 38
},
{
"__id__": 18
3
"__id__": 18
9
}
],
"_active": false,
...
...
@@ -118,18 +118,21 @@
},
{
"__id__": 157
},
{
"__id__": 161
}
],
"_active": true,
"_components": [
{
"__id__": 16
1
"__id__": 16
7
},
{
"__id__": 16
2
"__id__": 16
8
},
{
"__id__": 16
3
"__id__": 16
9
}
],
"_prefab": null,
...
...
@@ -2726,7 +2729,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 366,
"height": 22
3
"height": 22
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2824,7 +2827,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 366,
"height": 22
3
"height": 22
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3012,7 +3015,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 431,
"height": 18
5
"height": 18
3
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3110,7 +3113,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 431,
"height": 18
5
"height": 18
3
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3442,7 +3445,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 431,
"height": 18
5
"height": 18
3
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3536,7 +3539,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 366,
"height": 22
3
"height": 22
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3630,7 +3633,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 431,
"height": 18
5
"height": 18
3
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3724,7 +3727,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 366,
"height": 22
3
"height": 22
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3818,7 +3821,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 366,
"height": 22
3
"height": 22
1
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3912,7 +3915,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 431,
"height": 18
5
"height": 18
3
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -4006,7 +4009,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 366,
"height": 22
3
"height": 22
1
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -4100,7 +4103,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 431,
"height": 18
5
"height": 18
3
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -7609,6 +7612,228 @@
"_originalHeight": 0,
"_id": "5agG1+bapM1ISvxSwINAiV"
},
{
"__type__": "cc.Node",
"_name": "btn_return",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 162
},
{
"__id__": 163
},
{
"__id__": 165
},
{
"__id__": 166
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 139,
"height": 97
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-520.5,
261.5,
0,
0,
0,
0,
1,
1,
1,
0
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "58mrKmd0BLgYGc8JQRM9Uf"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 161
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d25ca776-b422-4ac6-bd30-47cd559446d8"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6fv2eAQ25KLrxUuFyzr7oU"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 161
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.1,
"clickEvents": [
{
"__id__": 164
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 3,
"transition": 3,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "1f5GduUa5MFa+AcQMRCA/G"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 161
},
"component": "",
"_componentId": "03cf1AAJ8tEP7sVAS7izhme",
"handler": "handleClickBack",
"customEventData": ""
},
{
"__type__": "03cf1AAJ8tEP7sVAS7izhme",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 161
},
"_enabled": true,
"_id": "41JplMJGxMJZrhyebc6OqI"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 161
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 50,
"_right": 0,
"_top": 50,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "fcPjR9v5tOaptNw3lCIlKZ"
},
{
"__type__": "cc.Canvas",
"_name": "",
...
...
@@ -7672,22 +7897,22 @@
},
"_children": [
{
"__id__": 1
65
"__id__": 1
71
},
{
"__id__": 1
67
"__id__": 1
73
},
{
"__id__": 1
69
"__id__": 1
75
},
{
"__id__": 17
1
"__id__": 17
7
},
{
"__id__": 17
3
"__id__": 17
9
},
{
"__id__": 1
75
"__id__": 1
81
}
],
"_active": true,
...
...
@@ -7745,13 +7970,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 1
64
"__id__": 1
70
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
66
"__id__": 1
72
}
],
"_prefab": null,
...
...
@@ -7807,7 +8032,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
65
"__id__": 1
71
},
"_enabled": true,
"_materials": [
...
...
@@ -7839,13 +8064,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 1
64
"__id__": 1
70
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
68
"__id__": 1
74
}
],
"_prefab": null,
...
...
@@ -7901,7 +8126,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
67
"__id__": 1
73
},
"_enabled": true,
"_materials": [
...
...
@@ -7933,13 +8158,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 1
64
"__id__": 1
70
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 17
0
"__id__": 17
6
}
],
"_prefab": null,
...
...
@@ -7995,7 +8220,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
69
"__id__": 1
75
},
"_enabled": true,
"_materials": [
...
...
@@ -8027,13 +8252,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 1
64
"__id__": 1
70
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 17
2
"__id__": 17
8
}
],
"_prefab": null,
...
...
@@ -8089,7 +8314,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
1
"__id__": 17
7
},
"_enabled": true,
"_materials": [
...
...
@@ -8121,13 +8346,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 1
64
"__id__": 1
70
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
74
"__id__": 1
80
}
],
"_prefab": null,
...
...
@@ -8183,7 +8408,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
3
"__id__": 17
9
},
"_enabled": true,
"_materials": [
...
...
@@ -8215,13 +8440,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 1
64
"__id__": 1
70
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
76
"__id__": 1
82
}
],
"_prefab": null,
...
...
@@ -8277,7 +8502,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
75
"__id__": 1
81
},
"_enabled": true,
"_materials": [
...
...
@@ -8313,13 +8538,13 @@
},
"_children": [
{
"__id__": 1
78
"__id__": 1
84
}
],
"_active": true,
"_components": [
{
"__id__": 18
2
"__id__": 18
8
}
],
"_prefab": null,
...
...
@@ -8375,17 +8600,17 @@
"_name": "Star",
"_objFlags": 0,
"_parent": {
"__id__": 1
77
"__id__": 1
83
},
"_children": [
{
"__id__": 1
79
"__id__": 1
85
}
],
"_active": false,
"_components": [
{
"__id__": 18
1
"__id__": 18
7
}
],
"_prefab": null,
...
...
@@ -8441,13 +8666,13 @@
"_name": "StarBig",
"_objFlags": 0,
"_parent": {
"__id__": 1
78
"__id__": 1
84
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 18
0
"__id__": 18
6
}
],
"_prefab": null,
...
...
@@ -8503,7 +8728,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
79
"__id__": 1
85
},
"_enabled": true,
"_materials": [],
...
...
@@ -8531,7 +8756,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
78
"__id__": 1
84
},
"_enabled": true,
"_materials": [
...
...
@@ -8563,7 +8788,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
77
"__id__": 1
83
},
"_enabled": true,
"_materials": [
...
...
@@ -8599,22 +8824,22 @@
},
"_children": [
{
"__id__": 1
84
"__id__": 1
90
},
{
"__id__": 1
86
"__id__": 1
92
},
{
"__id__": 19
0
"__id__": 19
6
},
{
"__id__": 19
2
"__id__": 19
8
}
],
"_active": true,
"_components": [
{
"__id__":
197
"__id__":
203
}
],
"_prefab": null,
...
...
@@ -8670,13 +8895,13 @@
"_name": "bg_picture1-finish",
"_objFlags": 0,
"_parent": {
"__id__": 18
3
"__id__": 18
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
85
"__id__": 1
91
}
],
"_prefab": null,
...
...
@@ -8691,7 +8916,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 366,
"height": 22
3
"height": 22
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -8732,7 +8957,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
84
"__id__": 1
90
},
"_enabled": true,
"_materials": [
...
...
@@ -8764,17 +8989,17 @@
"_name": "bg_picture1",
"_objFlags": 0,
"_parent": {
"__id__": 18
3
"__id__": 18
9
},
"_children": [
{
"__id__": 1
87
"__id__": 1
93
}
],
"_active": true,
"_components": [
{
"__id__": 1
89
"__id__": 1
95
}
],
"_prefab": null,
...
...
@@ -8789,7 +9014,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 366,
"height": 22
3
"height": 22
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -8830,13 +9055,13 @@
"_name": "pic",
"_objFlags": 0,
"_parent": {
"__id__": 1
86
"__id__": 1
92
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
88
"__id__": 1
94
}
],
"_prefab": null,
...
...
@@ -8892,7 +9117,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
87
"__id__": 1
93
},
"_enabled": true,
"_materials": [
...
...
@@ -8924,7 +9149,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
86
"__id__": 1
92
},
"_enabled": true,
"_materials": [
...
...
@@ -8956,13 +9181,13 @@
"_name": "bg_word1-finish",
"_objFlags": 0,
"_parent": {
"__id__": 18
3
"__id__": 18
9
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 19
1
"__id__": 19
7
}
],
"_prefab": null,
...
...
@@ -9018,7 +9243,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
0
"__id__": 19
6
},
"_enabled": true,
"_materials": [
...
...
@@ -9050,17 +9275,17 @@
"_name": "bg_word1",
"_objFlags": 0,
"_parent": {
"__id__": 18
3
"__id__": 18
9
},
"_children": [
{
"__id__": 19
3
"__id__": 19
9
}
],
"_active": false,
"_components": [
{
"__id__":
196
"__id__":
202
}
],
"_prefab": null,
...
...
@@ -9116,16 +9341,16 @@
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 19
2
"__id__": 19
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
194
"__id__":
200
},
{
"__id__":
195
"__id__":
201
}
],
"_prefab": null,
...
...
@@ -9181,7 +9406,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
3
"__id__": 19
9
},
"_enabled": true,
"_materials": [
...
...
@@ -9216,7 +9441,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
3
"__id__": 19
9
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -9243,7 +9468,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
2
"__id__": 19
8
},
"_enabled": true,
"_materials": [
...
...
@@ -9275,26 +9500,26 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
3
"__id__": 18
9
},
"_enabled": true,
"pic_node": {
"__id__": 1
86
"__id__": 1
92
},
"pic_finish": {
"__id__": 1
84
"__id__": 1
90
},
"pic": {
"__id__": 1
88
"__id__": 1
94
},
"word_node": {
"__id__": 19
2
"__id__": 19
8
},
"word_finish": {
"__id__": 19
0
"__id__": 19
6
},
"word": {
"__id__":
194
"__id__":
200
},
"_id": "8dsxiyZ1dGt6uZJDUodj+3"
}
...
...
assets/JJ_Game_07/script/BtnBack_JJ_Game_07.ts
0 → 100644
View file @
37c22dc6
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
default
class
NewClass
extends
cc
.
Component
{
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start
()
{
}
handleClickBack
()
{
const
middleLayer
=
global
[
"
middleLayer
"
];
if
(
middleLayer
)
{
// 有些模板需要在返回时上报数据,直接把数据作为参数传入就可以了
middleLayer
.
exitGame
({});
}
else
{
console
.
log
(
"
==触发返回事件==
"
);
}
}
// update (dt) {}
}
assets/JJ_Game_07/script/BtnBack_JJ_Game_07.ts.meta
0 → 100644
View file @
37c22dc6
{
"ver": "1.0.8",
"uuid": "03cf1000-27cb-443f-bb15-012ee2ce199e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
assets/JJ_Game_07/textures/btn_return.png
0 → 100644
View file @
37c22dc6
1.56 KB
assets/JJ_Game_07/textures/btn_return.png.meta
0 → 100644
View file @
37c22dc6
{
"ver": "2.3.5",
"uuid": "0b82c686-0772-42d2-94ad-d3485f249f88",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 139,
"height": 97,
"platformSettings": {},
"subMetas": {
"btn_return": {
"ver": "1.0.4",
"uuid": "d25ca776-b422-4ac6-bd30-47cd559446d8",
"rawTextureUuid": "0b82c686-0772-42d2-94ad-d3485f249f88",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 139,
"height": 97,
"rawWidth": 139,
"rawHeight": 97,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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