Commit 41b5b3bc authored by 李维's avatar 李维

添加返回按钮

parent 91dfcb97
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 74,
"height": 78,
"width": 112,
"height": 111,
"platformSettings": {},
"subMetas": {
"btn_laba": {
......
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 74,
"height": 78,
"width": 112,
"height": 111,
"platformSettings": {},
"subMetas": {
"btn_laba2": {
......
This diff is collapsed.
// 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) {}
}
{
"ver": "1.0.8",
"uuid": "54892d44-799d-4ff5-95b2-5a9898e0fd54",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "dbd8b4ff-4d51-460a-ab5b-8e8d287cf1ec",
"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": "6c6b76a2-687e-4e82-b57a-25b981c484cd",
"rawTextureUuid": "dbd8b4ff-4d51-460a-ab5b-8e8d287cf1ec",
"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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment