Commit 6a29e645 authored by 范雪寒's avatar 范雪寒

feat:

parent 175e80c3
...@@ -42,6 +42,8 @@ export default class NewClass extends middleLayerBase { ...@@ -42,6 +42,8 @@ export default class NewClass extends middleLayerBase {
protected start(): void { protected start(): void {
this.node.zIndex = 9999; this.node.zIndex = 9999;
cc.game.addPersistRootNode(this.node); cc.game.addPersistRootNode(this.node);
this.loadOnlineBundle('NJ_login');
} }
role = 'student'; role = 'student';
......
...@@ -111,14 +111,11 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -111,14 +111,11 @@ export abstract class middleLayerBase extends cc.Component {
this.showWaitingLetters(); this.showWaitingLetters();
cc.assetManager.loadBundle(bondleUrl, { version: version }, async (err, bundle) => { cc.assetManager.loadBundle(bondleUrl, { version: version }, async (err, bundle) => {
bundle.loadScene(sceneName, null, null, (err, scene) => { bundle.loadScene(sceneName, null, null, (err, scene) => {
const btnRestart = cc.find('middleLayer/BtnRestart');
btnRestart.active = false;
cc.audioEngine.stopAll(); cc.audioEngine.stopAll();
cc.director.runScene(scene, null, () => { cc.director.runScene(scene, null, () => {
console.log('sceneName = ' + sceneName); console.log('sceneName = ' + sceneName);
const canvas = cc.find('Canvas'); const canvas = cc.find('Canvas');
const middleLayer = cc.find('middleLayer'); const middleLayer = cc.find('middleLayer');
cc.find('middleLayer/ExitBtn').active = true;
this.hideWaitingLetters(); this.hideWaitingLetters();
this.hideMask(); this.hideMask();
canvas.getComponent(cc.Widget).updateAlignment(); canvas.getComponent(cc.Widget).updateAlignment();
......
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