Commit 51935935 authored by 范雪寒's avatar 范雪寒

feat: 适配

parent 23fc4232
......@@ -73,8 +73,13 @@ cc.Class({
onLoad() {
this.preloadCount = 0;
this.loadedCount = 0;
const ui = cc.find('middleLayer/ui');
ui.scale = Math.min(cc.view.getFrameSize().width/ui.width, cc.view.getFrameSize().height/ui.height);
const uiNode = cc.find('middleLayer/ui');
uiNode.parent.getComponent(cc.Widget).updateAlignment();
const scale = Math.min(
uiNode.parent.width / uiNode.width,
uiNode.parent.height / uiNode.height,
)
uiNode.scale = scale;
initAir(this);
// this.preloadAll();
},
......
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