Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg09_jq
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
dg09_jq
Commits
61404551
Commit
61404551
authored
Oct 31, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退出按钮
parent
382b23b4
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
809 additions
and
636 deletions
+809
-636
dg09_jq.fire
assets/dg09_jq/scene/dg09_jq.fire
+763
-636
dg09_jq.ts
assets/dg09_jq/scene/dg09_jq.ts
+10
-0
btn_return.png
assets/dg09_jq/textures/public/btn_return.png
+0
-0
btn_return.png.meta
assets/dg09_jq/textures/public/btn_return.png.meta
+36
-0
No files found.
assets/dg09_jq/scene/dg09_jq.fire
View file @
61404551
This diff is collapsed.
Click to expand it.
assets/dg09_jq/scene/dg09_jq.ts
View file @
61404551
...
...
@@ -112,6 +112,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
initEvent
()
{
this
.
btn_laba
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
playLaba
,
this
);
cc
.
find
(
"
layout_info/btn_return
"
,
this
.
node
).
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
exitGame
,
this
);
// this.btn_record.on(cc.Node.EventType.TOUCH_END, this.onTouchRecord, this);
// this.btn_recording.on(cc.Node.EventType.TOUCH_END, this.onTouchRecordEnd, this);
cc
.
find
(
"
btn_close
"
,
this
.
layout_final
).
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onCloseFinal
,
this
);
...
...
@@ -123,6 +124,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
roundEnd
();
});
}
private
exitGame
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
)?.
getComponent
(
'
middleLayer
'
);
if
(
middleLayer
)
{
// 有些模板需要在返回时上报数据,直接把数据作为参数传入就可以了
middleLayer
.
exitGame
(
null
);
//this.resData
}
else
{
console
.
log
(
"
==触发返回事件==
"
);
}
}
private
onRestart
()
{
this
.
playLocalAudio
(
"
btn
"
);
this
.
layout_final
.
active
=
false
;
...
...
assets/dg09_jq/textures/public/btn_return.png
0 → 100644
View file @
61404551
8.53 KB
assets/dg09_jq/textures/public/btn_return.png.meta
0 → 100644
View file @
61404551
{
"ver": "2.3.5",
"uuid": "9f74d2ea-4e9a-4f24-9552-bb65e215675c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 131,
"height": 131,
"platformSettings": {},
"subMetas": {
"btn_return": {
"ver": "1.0.4",
"uuid": "cccde8c0-4880-4287-8ac6-c0662c685392",
"rawTextureUuid": "9f74d2ea-4e9a-4f24-9552-bb65e215675c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 131,
"height": 131,
"rawWidth": 131,
"rawHeight": 131,
"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