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

feat:

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