Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_12
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_12
Commits
f400be83
Commit
f400be83
authored
Aug 23, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加返回按钮
parent
1d722888
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
324 additions
and
22 deletions
+324
-22
BtnBack_JJ_Game_12.ts
assets/JJ_Game_12/Script/BtnBack_JJ_Game_12.ts
+32
-0
BtnBack_JJ_Game_12.ts.meta
assets/JJ_Game_12/Script/BtnBack_JJ_Game_12.ts.meta
+9
-0
btn_return.png
assets/JJ_Game_12/Texture/btn_return.png
+0
-0
btn_return.png.meta
assets/JJ_Game_12/Texture/btn_return.png.meta
+36
-0
JJ_Game_12.fire
assets/JJ_Game_12/scene/JJ_Game_12.fire
+247
-22
No files found.
assets/JJ_Game_12/Script/BtnBack_JJ_Game_12.ts
0 → 100644
View file @
f400be83
// 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_12/Script/BtnBack_JJ_Game_12.ts.meta
0 → 100644
View file @
f400be83
{
"ver": "1.0.8",
"uuid": "0a3c462f-1dee-4a1d-aea5-18a025386912",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
assets/JJ_Game_12/Texture/btn_return.png
0 → 100644
View file @
f400be83
1.56 KB
assets/JJ_Game_12/Texture/btn_return.png.meta
0 → 100644
View file @
f400be83
{
"ver": "2.3.5",
"uuid": "b3dc9174-6b08-43d9-b7c6-9075feb4aebe",
"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": "2edc0e9d-cd34-4b06-9ae5-31339c08d5f4",
"rawTextureUuid": "b3dc9174-6b08-43d9-b7c6-9075feb4aebe",
"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
assets/JJ_Game_12/scene/JJ_Game_12.fire
View file @
f400be83
...
@@ -93,22 +93,25 @@
...
@@ -93,22 +93,25 @@
"__id__": 69
"__id__": 69
},
},
{
{
"__id__": 7
3
"__id__": 7
5
},
},
{
{
"__id__": 75
"__id__": 79
},
{
"__id__": 81
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 8
1
"__id__": 8
7
},
},
{
{
"__id__": 8
2
"__id__": 8
8
},
},
{
{
"__id__": 8
3
"__id__": 8
9
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3029,13 +3032,13 @@
...
@@ -3029,13 +3032,13 @@
},
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "
animBg
",
"_name": "
btn_return
",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
fals
e,
"_active":
tru
e,
"_components": [
"_components": [
{
{
"__id__": 70
"__id__": 70
...
@@ -3045,6 +3048,228 @@
...
@@ -3045,6 +3048,228 @@
},
},
{
{
"__id__": 72
"__id__": 72
},
{
"__id__": 73
}
],
"_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": [
-840.5,
441.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": "12b1m9/BRFY4MEvSzWfbQy"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "2edc0e9d-cd34-4b06-9ae5-31339c08d5f4"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "cb4rz7jeJFd7Xe3Nka4cG0"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_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": "eb+O7GfFtAArThp2MyOb3M"
},
{
"__type__": "0a3c4YvHe5KHa6lGKAlOGkS",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_id": "06B4Q4M+pD4J/92NbkO4qQ"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.1,
"clickEvents": [
{
"__id__": 74
}
],
"_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": "2d8hqAPcJMBbPo+ZvmKlnH"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 69
},
"component": "",
"_componentId": "0a3c4YvHe5KHa6lGKAlOGkS",
"handler": "handleClickBack",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "animBg",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 76
},
{
"__id__": 77
},
{
"__id__": 78
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3100,7 +3325,7 @@
...
@@ -3100,7 +3325,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
69
"__id__":
75
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3132,7 +3357,7 @@
...
@@ -3132,7 +3357,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
69
"__id__":
75
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -3159,7 +3384,7 @@
...
@@ -3159,7 +3384,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
69
"__id__":
75
},
},
"_enabled": true,
"_enabled": true,
"_id": "beaGv1g0JBZ59RUOJpzt0W"
"_id": "beaGv1g0JBZ59RUOJpzt0W"
...
@@ -3175,7 +3400,7 @@
...
@@ -3175,7 +3400,7 @@
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
74
"__id__":
80
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3231,7 +3456,7 @@
...
@@ -3231,7 +3456,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 7
3
"__id__": 7
9
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -3262,16 +3487,16 @@
...
@@ -3262,16 +3487,16 @@
},
},
"_children": [
"_children": [
{
{
"__id__":
76
"__id__":
82
}
}
],
],
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
79
"__id__":
85
},
},
{
{
"__id__": 8
0
"__id__": 8
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3327,16 +3552,16 @@
...
@@ -3327,16 +3552,16 @@
"_name": "title",
"_name": "title",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
75
"__id__":
81
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
77
"__id__":
83
},
},
{
{
"__id__":
78
"__id__":
84
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3392,7 +3617,7 @@
...
@@ -3392,7 +3617,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
76
"__id__":
82
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3427,7 +3652,7 @@
...
@@ -3427,7 +3652,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
76
"__id__":
82
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -3454,7 +3679,7 @@
...
@@ -3454,7 +3679,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
75
"__id__":
81
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -3486,7 +3711,7 @@
...
@@ -3486,7 +3711,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
75
"__id__":
81
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
...
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