Commit a6c55fa3 authored by wangxin's avatar wangxin

Update Scene.js

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