Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg10_ty
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
dg10_ty
Commits
93cd0443
Commit
93cd0443
authored
Oct 31, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退出按钮
parent
6427b047
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
413 additions
and
165 deletions
+413
-165
dg10_ty.fire
assets/dg10_ty/scene/dg10_ty.fire
+365
-164
dg10_ty.ts
assets/dg10_ty/scene/dg10_ty.ts
+12
-1
btn-return.png
assets/dg10_ty/textures/btn-return.png
+0
-0
btn-return.png.meta
assets/dg10_ty/textures/btn-return.png.meta
+36
-0
No files found.
assets/dg10_ty/scene/dg10_ty.fire
View file @
93cd0443
This diff is collapsed.
Click to expand it.
assets/dg10_ty/scene/dg10_ty.ts
View file @
93cd0443
...
@@ -81,6 +81,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -81,6 +81,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
btn_laba
:
cc
.
Node
=
null
;
btn_laba
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
btn_return
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
btn_record
:
cc
.
Node
=
null
;
btn_record
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
btn_recording
:
cc
.
Node
=
null
;
btn_recording
:
cc
.
Node
=
null
;
...
@@ -121,9 +123,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -121,9 +123,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc
.
find
(
"
layout_info/label_title
"
,
this
.
node
).
getComponent
(
cc
.
Label
).
string
=
Game
.
getIns
().
title
;
cc
.
find
(
"
layout_info/label_title
"
,
this
.
node
).
getComponent
(
cc
.
Label
).
string
=
Game
.
getIns
().
title
;
}
}
}
}
exitGame
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
)?.
getComponent
(
'
middleLayer
'
);
if
(
middleLayer
)
{
// 有些模板需要在返回时上报数据,直接把数据作为参数传入就可以了
middleLayer
.
exitGame
(
null
);
//this.resData
}
else
{
console
.
log
(
"
==触发返回事件==
"
);
}
}
initEvent
()
{
initEvent
()
{
this
.
btn_laba
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
playLaba
,
this
);
this
.
btn_laba
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
playLaba
,
this
);
this
.
btn_return
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
exitGame
,
this
);
cc
.
find
(
"
btn_close
"
,
this
.
layout_final
).
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onCloseFinal
,
this
);
cc
.
find
(
"
btn_close
"
,
this
.
layout_final
).
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onCloseFinal
,
this
);
cc
.
find
(
"
btn_restart
"
,
this
.
layout_final
).
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onRestart
,
this
);
cc
.
find
(
"
btn_restart
"
,
this
.
layout_final
).
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onRestart
,
this
);
pg
.
event
.
on
(
"
game_start
"
,
()
=>
{
pg
.
event
.
on
(
"
game_start
"
,
()
=>
{
...
...
assets/dg10_ty/textures/btn-return.png
0 → 100644
View file @
93cd0443
8.53 KB
assets/dg10_ty/textures/btn-return.png.meta
0 → 100644
View file @
93cd0443
{
"ver": "2.3.5",
"uuid": "99d3450e-9cac-4fac-98c5-815a4f9b2b1f",
"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": "0072fed4-a751-4c0f-a8fa-178862fd46d1",
"rawTextureUuid": "99d3450e-9cac-4fac-98c5-815a4f9b2b1f",
"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