Commit b9586385 authored by liujiangnan's avatar liujiangnan

feat: 返回按钮

parent 1c664a11
......@@ -79,18 +79,21 @@
},
{
"__id__": 43
},
{
"__id__": 47
}
],
"_active": true,
"_components": [
{
"__id__": 47
"__id__": 49
},
{
"__id__": 48
"__id__": 50
},
{
"__id__": 49
"__id__": 51
}
],
"_prefab": null,
......@@ -2225,6 +2228,100 @@
"_originalHeight": 720,
"_id": "fbteI5DiBJZIIHk3rG9Q7H"
},
{
"__type__": "cc.Node",
"_name": "btn_return",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 48
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 107,
"height": 112
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-579.077,
303.117,
0,
0,
0,
0,
1,
0.6,
0.6,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "84oIP6jaxDFLqqCiw6JpA1"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a1b2ff22-720f-406f-a677-ee89ba5f74c5"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "5epT0RkgZMlLPqDI1eaCkj"
},
{
"__type__": "cc.Canvas",
"_name": "",
......
......@@ -69,6 +69,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
initListener() {
const btnReturn = cc.find('Canvas/btn_return');
buttonOnClick(btnReturn, () => {
const middleLayer = cc.find('middleLayer');
if (middleLayer) {
middleLayer.getComponent('middleLayer').loadOnlineBundle("NJ_MoreGames");
}
}, 0.6);
const levelNode = cc.find(`Canvas/${this.level}`);
for (let i = 1; i <= 5; i++) {
const item = cc.find(`item${i}`, levelNode);
......
{
"ver": "2.3.5",
"uuid": "83e903df-0940-473e-bee2-df731c0b0f25",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 107,
"height": 112,
"platformSettings": {},
"subMetas": {
"btn_return": {
"ver": "1.0.4",
"uuid": "a1b2ff22-720f-406f-a677-ee89ba5f74c5",
"rawTextureUuid": "83e903df-0940-473e-bee2-df731c0b0f25",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 107,
"height": 112,
"rawWidth": 107,
"rawHeight": 112,
"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