Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_01
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_01
Commits
c7e6e511
Commit
c7e6e511
authored
Aug 23, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加返回按钮
parent
3afcd2f5
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
424 additions
and
122 deletions
+424
-122
JJ_Game_01.fire
assets/JJ_Game_01/scene/JJ_Game_01.fire
+347
-122
JJ_Game_01_BtnBack.ts
assets/JJ_Game_01/script/JJ_Game_01_BtnBack.ts
+32
-0
JJ_Game_01_BtnBack.ts.meta
assets/JJ_Game_01/script/JJ_Game_01_BtnBack.ts.meta
+9
-0
btn_return.png
assets/JJ_Game_01/texture/btn_return.png
+0
-0
btn_return.png.meta
assets/JJ_Game_01/texture/btn_return.png.meta
+36
-0
No files found.
assets/JJ_Game_01/scene/JJ_Game_01.fire
View file @
c7e6e511
This diff is collapsed.
Click to expand it.
assets/JJ_Game_01/script/JJ_Game_01_BtnBack.ts
0 → 100644
View file @
c7e6e511
// 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_01/script/JJ_Game_01_BtnBack.ts.meta
0 → 100644
View file @
c7e6e511
{
"ver": "1.0.8",
"uuid": "62c2db57-8513-4390-8202-e3dfdd39cb43",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
assets/JJ_Game_01/texture/btn_return.png
0 → 100644
View file @
c7e6e511
1.56 KB
assets/JJ_Game_01/texture/btn_return.png.meta
0 → 100644
View file @
c7e6e511
{
"ver": "2.3.5",
"uuid": "cdc8d4a4-7a8c-4090-9685-87cbc8580cd6",
"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": "ec34bd09-b446-44e9-809b-e41ad22e60da",
"rawTextureUuid": "cdc8d4a4-7a8c-4090-9685-87cbc8580cd6",
"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