Commit a6c55fa3 authored by wangxin's avatar wangxin

Update Scene.js

parent 49eab228
...@@ -177,7 +177,7 @@ cc.Class({ ...@@ -177,7 +177,7 @@ cc.Class({
this._cantouch = true; this._cantouch = true;
}, },
initView(cb = null) { initView() {
this.initBg(); this.initBg();
// 初始化title // 初始化title
...@@ -223,18 +223,12 @@ cc.Class({ ...@@ -223,18 +223,12 @@ cc.Class({
op.getComponent("option")._count = this.data.options.length; op.getComponent("option")._count = this.data.options.length;
this.options.addChild(op); this.options.addChild(op);
} }
if (!cb) {
cc.audioEngine.playEffect(this.openMusic, false); cc.audioEngine.playEffect(this.openMusic, false);
var self = this; let self = this;
cc.view.setResizeCallback(function () { this.scheduleOnce(function () {
console.log("resize"); self.options.getComponent(cc.Layout).enabled = false;
let windowSize = cc.view.getVisibleSize(); }, 0.2);
let scaleNode = windowSize.width / 1280;
self.options.scale = scaleNode;
});
}
}, },
playTitle() { playTitle() {
......
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