Commit eeb2f1a8 authored by limingzhe's avatar limingzhe

feat: 增加返回按钮

parent a924016c
......@@ -309,15 +309,18 @@
},
{
"__id__": 31
},
{
"__id__": 33
}
],
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 40
},
{
"__id__": 34
"__id__": 41
}
],
"_prefab": null,
......@@ -1271,6 +1274,308 @@
"_enabled": true,
"_id": "c8RSZKHRJO95/RfIMIkSA5"
},
{
"__type__": "cc.Node",
"_name": "UI",
"_objFlags": 0,
"_parent": {
"__id__": 8
},
"_children": [
{
"__id__": 34
}
],
"_active": true,
"_components": [
{
"__id__": 39
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3cIulweltNCIPa0L3JaYdX"
},
{
"__type__": "cc.Node",
"_name": "back_btn",
"_objFlags": 0,
"_parent": {
"__id__": 33
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 35
},
{
"__id__": 36
},
{
"__id__": 37
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 131,
"height": 131
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-884.437,
461.64099999999996,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "70+De3TD5ElZRksMzpESNM"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "57bdc862-1a68-4657-9b66-b5115d097b7e"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "8bj9WfBfpDqrGLeisuo1ZC"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 10.062999999999988,
"_right": 0,
"_top": 12.859000000000037,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "4aQTJ1WuRINZO0NF2FiArk"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 38
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "9cy/o1VQJDCavfKC1kTZad"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 8
},
"component": "",
"_componentId": "60d81OE+nRLtoMukBLWZZu2",
"handler": "exitGame",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "a6x1SL2i5LOIC5FsQBrvYh"
},
{
"__type__": "cc.Widget",
"_name": "",
......
......@@ -47,9 +47,20 @@ export default class NewClass extends middleLayerBase {
this.loadOnlineCourseWare(this.course_id, false, this.courseware_id);
this.initListener();
this.initUI();
}
initUI() {
}
loadPageBundleEnd() {
const backBtn = cc.find("middleLayer/UI/back_btn");
backBtn.active = true;
}
onHomeworkFinish(callBack, data = null) {
if (!this.token) {
return;
......
......@@ -306,10 +306,15 @@ export abstract class middleLayerBase extends cc.Component {
return;
}
this.loadPageBundle(() => {
this.loadPageBundleEnd();
});
});
}
loadPageBundleEnd() {
//子类重写此方法 勿删
}
loadPageBundle(callback = null) {
console.log(" in loadPageBundle");
let sceneName, version, bondleUrl = "";
......
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