Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_10
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_10
Commits
d631d85a
Commit
d631d85a
authored
Aug 23, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加返回按钮
parent
4c4991fe
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
357 additions
and
55 deletions
+357
-55
JJ_Game_10.fire
assets/JJ_Game_10/scene/JJ_Game_10.fire
+280
-55
BtnBack_JJ_Game_10.ts
assets/JJ_Game_10/script/BtnBack_JJ_Game_10.ts
+32
-0
BtnBack_JJ_Game_10.ts.meta
assets/JJ_Game_10/script/BtnBack_JJ_Game_10.ts.meta
+9
-0
btn_return.png
assets/JJ_Game_10/textures/btn_return.png
+0
-0
btn_return.png.meta
assets/JJ_Game_10/textures/btn_return.png.meta
+36
-0
No files found.
assets/JJ_Game_10/scene/JJ_Game_10.fire
View file @
d631d85a
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"__id__": 2
"__id__": 2
},
},
{
{
"__id__":
76
"__id__":
82
}
}
],
],
"_active": false,
"_active": false,
...
@@ -109,18 +109,21 @@
...
@@ -109,18 +109,21 @@
},
},
{
{
"__id__": 51
"__id__": 51
},
{
"__id__": 57
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 7
3
"__id__": 7
9
},
},
{
{
"__id__":
74
"__id__":
80
},
},
{
{
"__id__":
75
"__id__":
81
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2616,22 +2619,244 @@
...
@@ -2616,22 +2619,244 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
res
",
"_name": "
btn_return
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
},
},
"_children": [
"_children": [],
"_active": true,
"_components": [
{
{
"__id__": 52
"__id__": 52
},
},
{
{
"__id__": 53
"__id__": 53
},
},
{
"__id__": 54
},
{
"__id__": 55
}
],
"_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": "adwcrsY+5DmZ+f4TqemJn8"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "12b22d6d-6d59-4ad9-b5e2-0a36097fd727"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "38oaVhpbJI9LtCF0mhK5g1"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
},
"_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": "95JcXRx15IRroa9+bIN1NF"
},
{
"__type__": "4f4e5FcR1NAzIs/kZx8de8z",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
},
"_enabled": true,
"_id": "a1qrUs4ihPNqux+DRlQ3bh"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.1,
"clickEvents": [
{
{
"__id__": 56
"__id__": 56
}
}
],
],
"_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": "6a4rA1RTNJWI0Dv0Q090CE"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 51
},
"component": "",
"_componentId": "4f4e5FcR1NAzIs/kZx8de8z",
"handler": "handleClickBack",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "res",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 58
},
{
"__id__": 59
},
{
"__id__": 62
}
],
"_active": false,
"_active": false,
"_components": [],
"_components": [],
"_prefab": null,
"_prefab": null,
...
@@ -2687,7 +2912,7 @@
...
@@ -2687,7 +2912,7 @@
"_name": "font",
"_name": "font",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
1
"__id__": 5
7
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
...
@@ -2745,11 +2970,11 @@
...
@@ -2745,11 +2970,11 @@
"_name": "img",
"_name": "img",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
1
"__id__": 5
7
},
},
"_children": [
"_children": [
{
{
"__id__":
54
"__id__":
60
}
}
],
],
"_active": true,
"_active": true,
...
@@ -2807,13 +3032,13 @@
...
@@ -2807,13 +3032,13 @@
"_name": "icon",
"_name": "icon",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
3
"__id__": 5
9
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
55
"__id__":
61
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2869,7 +3094,7 @@
...
@@ -2869,7 +3094,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
54
"__id__":
60
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [],
...
@@ -2897,32 +3122,32 @@
...
@@ -2897,32 +3122,32 @@
"_name": "audio",
"_name": "audio",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 5
1
"__id__": 5
7
},
},
"_children": [
"_children": [
{
{
"__id__":
57
"__id__":
63
},
},
{
{
"__id__":
59
"__id__":
65
},
},
{
{
"__id__": 6
1
"__id__": 6
7
},
},
{
{
"__id__": 6
3
"__id__": 6
9
},
},
{
{
"__id__":
65
"__id__":
71
},
},
{
{
"__id__":
67
"__id__":
73
},
},
{
{
"__id__":
69
"__id__":
75
},
},
{
{
"__id__": 7
1
"__id__": 7
7
}
}
],
],
"_active": true,
"_active": true,
...
@@ -2980,13 +3205,13 @@
...
@@ -2980,13 +3205,13 @@
"_name": "btn",
"_name": "btn",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
56
"__id__":
62
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
58
"__id__":
64
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3042,7 +3267,7 @@
...
@@ -3042,7 +3267,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
57
"__id__":
63
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3061,13 +3286,13 @@
...
@@ -3061,13 +3286,13 @@
"_name": "出现",
"_name": "出现",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
56
"__id__":
62
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 6
0
"__id__": 6
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3123,7 +3348,7 @@
...
@@ -3123,7 +3348,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
59
"__id__":
65
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3142,13 +3367,13 @@
...
@@ -3142,13 +3367,13 @@
"_name": "正确",
"_name": "正确",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
56
"__id__":
62
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 6
2
"__id__": 6
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3204,7 +3429,7 @@
...
@@ -3204,7 +3429,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
1
"__id__": 6
7
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3223,13 +3448,13 @@
...
@@ -3223,13 +3448,13 @@
"_name": "错误泡泡爆炸",
"_name": "错误泡泡爆炸",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
56
"__id__":
62
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
64
"__id__":
70
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3285,7 +3510,7 @@
...
@@ -3285,7 +3510,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 6
3
"__id__": 6
9
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3304,13 +3529,13 @@
...
@@ -3304,13 +3529,13 @@
"_name": "按钮",
"_name": "按钮",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
56
"__id__":
62
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
66
"__id__":
72
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3366,7 +3591,7 @@
...
@@ -3366,7 +3591,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
65
"__id__":
71
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3385,13 +3610,13 @@
...
@@ -3385,13 +3610,13 @@
"_name": "大星",
"_name": "大星",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
56
"__id__":
62
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
68
"__id__":
74
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3447,7 +3672,7 @@
...
@@ -3447,7 +3672,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
67
"__id__":
73
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3466,13 +3691,13 @@
...
@@ -3466,13 +3691,13 @@
"_name": "题数",
"_name": "题数",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
56
"__id__":
62
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 7
0
"__id__": 7
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3528,7 +3753,7 @@
...
@@ -3528,7 +3753,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
69
"__id__":
75
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3547,13 +3772,13 @@
...
@@ -3547,13 +3772,13 @@
"_name": "撒花",
"_name": "撒花",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
56
"__id__":
62
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 7
2
"__id__": 7
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3609,7 +3834,7 @@
...
@@ -3609,7 +3834,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
1
"__id__": 7
7
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -3695,13 +3920,13 @@
...
@@ -3695,13 +3920,13 @@
},
},
"_children": [
"_children": [
{
{
"__id__":
77
"__id__":
83
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
1
"__id__": 8
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3757,17 +3982,17 @@
...
@@ -3757,17 +3982,17 @@
"_name": "Star",
"_name": "Star",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
76
"__id__":
82
},
},
"_children": [
"_children": [
{
{
"__id__":
78
"__id__":
84
}
}
],
],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 8
0
"__id__": 8
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3823,13 +4048,13 @@
...
@@ -3823,13 +4048,13 @@
"_name": "StarBig",
"_name": "StarBig",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
77
"__id__":
83
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
79
"__id__":
85
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3885,7 +4110,7 @@
...
@@ -3885,7 +4110,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
78
"__id__":
84
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3917,7 +4142,7 @@
...
@@ -3917,7 +4142,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
77
"__id__":
83
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3949,7 +4174,7 @@
...
@@ -3949,7 +4174,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
76
"__id__":
82
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
...
assets/JJ_Game_10/script/BtnBack_JJ_Game_10.ts
0 → 100644
View file @
d631d85a
// 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_10/script/BtnBack_JJ_Game_10.ts.meta
0 → 100644
View file @
d631d85a
{
"ver": "1.0.8",
"uuid": "4f4e515c-4753-40cc-8b3f-919c7c75ef33",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
assets/JJ_Game_10/textures/btn_return.png
0 → 100644
View file @
d631d85a
1.56 KB
assets/JJ_Game_10/textures/btn_return.png.meta
0 → 100644
View file @
d631d85a
{
"ver": "2.3.5",
"uuid": "861f1bbe-7e01-47a9-8ace-f6f1d4af7242",
"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": "12b22d6d-6d59-4ad9-b5e2-0a36097fd727",
"rawTextureUuid": "861f1bbe-7e01-47a9-8ace-f6f1d4af7242",
"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