oppo 不能监听 下面的函数重置ui。注释掉就好了。自问自答,希望有用。
Laya.stage.on(Laya.Event.RESIZE, this, this.resize);
static resize(): void {
// let w = this.config.width;
// let h = this.config.height;
// let screen_wh_scale = Laya.Browser.clientWidth / Laya.Browser.clientHeight;
// if (Laya.stage.scaleMode == Laya.Stage.SCALE_FIXED_WIDTH) {
// h = this.config.width / screen_wh_scale;
// } else {
// w = this.config.height * screen_wh_scale;
// }
// Laya.Scene.unDestroyedScenes.forEach(element => {
// let s = element as Laya.Scene;
// s.width = w;
// s.height = h;
// });
}