Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_11
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_11
Commits
22dab672
Commit
22dab672
authored
Aug 23, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加返回按钮
parent
e9250568
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
331 additions
and
29 deletions
+331
-29
JJ_Game_11.fire
assets/JJ_Game_11/scene/JJ_Game_11.fire
+254
-29
BtnBack_JJ_Game_11.ts
assets/JJ_Game_11/script/BtnBack_JJ_Game_11.ts
+32
-0
BtnBack_JJ_Game_11.ts.meta
assets/JJ_Game_11/script/BtnBack_JJ_Game_11.ts.meta
+9
-0
btn_return.png
assets/JJ_Game_11/texture/btn_return.png
+0
-0
btn_return.png.meta
assets/JJ_Game_11/texture/btn_return.png.meta
+36
-0
No files found.
assets/JJ_Game_11/scene/JJ_Game_11.fire
View file @
22dab672
...
@@ -85,18 +85,21 @@
...
@@ -85,18 +85,21 @@
},
},
{
{
"__id__": 14
"__id__": 14
},
{
"__id__": 20
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
28
"__id__":
34
},
},
{
{
"__id__":
29
"__id__":
35
},
},
{
{
"__id__": 3
0
"__id__": 3
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -651,6 +654,228 @@
...
@@ -651,6 +654,228 @@
"_atlas": null,
"_atlas": null,
"_id": "96PHvIBglCBJGFuVQXNadC"
"_id": "96PHvIBglCBJGFuVQXNadC"
},
},
{
"__type__": "cc.Node",
"_name": "btn_return",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
},
{
"__id__": 16
},
{
"__id__": 17
},
{
"__id__": 18
}
],
"_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": "48dVbxzopHK5cbE9dk/V8B"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "eb324efb-8998-44ff-b67d-41b8e5fe7a71"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "f7KCTLoldGY6JRRNgIExdp"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_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": "e4zpTFUS9IYLZuBglCwo+O"
},
{
"__type__": "72a801f9AxOeptW8Ot9ijdW",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_id": "ce3NmeqtZE+JM94Tqgw4oK"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.1,
"clickEvents": [
{
"__id__": 19
}
],
"_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": "45Alt7O6dJu4vFQA0S9Cja"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 14
},
"component": "",
"_componentId": "72a801f9AxOeptW8Ot9ijdW",
"handler": "handleClickBack",
"customEventData": ""
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "res",
"_name": "res",
...
@@ -660,13 +885,13 @@
...
@@ -660,13 +885,13 @@
},
},
"_children": [
"_children": [
{
{
"__id__":
15
"__id__":
21
},
},
{
{
"__id__": 2
2
"__id__": 2
8
},
},
{
{
"__id__":
25
"__id__":
31
}
}
],
],
"_active": false,
"_active": false,
...
@@ -724,17 +949,17 @@
...
@@ -724,17 +949,17 @@
"_name": "img",
"_name": "img",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
14
"__id__":
20
},
},
"_children": [
"_children": [
{
{
"__id__":
16
"__id__":
22
},
},
{
{
"__id__":
18
"__id__":
24
},
},
{
{
"__id__": 2
0
"__id__": 2
6
}
}
],
],
"_active": true,
"_active": true,
...
@@ -792,13 +1017,13 @@
...
@@ -792,13 +1017,13 @@
"_name": "btn_play",
"_name": "btn_play",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
15
"__id__":
21
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
17
"__id__":
23
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -854,7 +1079,7 @@
...
@@ -854,7 +1079,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
16
"__id__":
22
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [],
...
@@ -882,13 +1107,13 @@
...
@@ -882,13 +1107,13 @@
"_name": "btn_replay",
"_name": "btn_replay",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
15
"__id__":
21
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
19
"__id__":
25
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -944,7 +1169,7 @@
...
@@ -944,7 +1169,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
18
"__id__":
24
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [],
...
@@ -972,13 +1197,13 @@
...
@@ -972,13 +1197,13 @@
"_name": "btn_stop",
"_name": "btn_stop",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
15
"__id__":
21
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
1
"__id__": 2
7
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1034,7 +1259,7 @@
...
@@ -1034,7 +1259,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
0
"__id__": 2
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [],
...
@@ -1062,11 +1287,11 @@
...
@@ -1062,11 +1287,11 @@
"_name": "font",
"_name": "font",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
14
"__id__":
20
},
},
"_children": [
"_children": [
{
{
"__id__": 2
3
"__id__": 2
9
}
}
],
],
"_active": true,
"_active": true,
...
@@ -1124,13 +1349,13 @@
...
@@ -1124,13 +1349,13 @@
"_name": "BRLNSDB",
"_name": "BRLNSDB",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
2
"__id__": 2
8
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
24
"__id__":
30
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1186,7 +1411,7 @@
...
@@ -1186,7 +1411,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
3
"__id__": 2
9
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [],
...
@@ -1217,11 +1442,11 @@
...
@@ -1217,11 +1442,11 @@
"_name": "audio",
"_name": "audio",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
14
"__id__":
20
},
},
"_children": [
"_children": [
{
{
"__id__":
26
"__id__":
32
}
}
],
],
"_active": true,
"_active": true,
...
@@ -1279,13 +1504,13 @@
...
@@ -1279,13 +1504,13 @@
"_name": "click",
"_name": "click",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
25
"__id__":
31
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
27
"__id__":
33
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1341,7 +1566,7 @@
...
@@ -1341,7 +1566,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
26
"__id__":
32
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
...
assets/JJ_Game_11/script/BtnBack_JJ_Game_11.ts
0 → 100644
View file @
22dab672
// 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_11/script/BtnBack_JJ_Game_11.ts.meta
0 → 100644
View file @
22dab672
{
"ver": "1.0.8",
"uuid": "72a80d5f-f40c-4e7a-9b56-f0eb7d8a3756",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
assets/JJ_Game_11/texture/btn_return.png
0 → 100644
View file @
22dab672
1.56 KB
assets/JJ_Game_11/texture/btn_return.png.meta
0 → 100644
View file @
22dab672
{
"ver": "2.3.5",
"uuid": "9aa1a896-c5d3-460b-994e-0ab1d9669795",
"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": "eb324efb-8998-44ff-b67d-41b8e5fe7a71",
"rawTextureUuid": "9aa1a896-c5d3-460b-994e-0ab1d9669795",
"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