Commit 6e1b36a5 authored by wangxin's avatar wangxin

Update Scene.js

parent 3a62707a
...@@ -177,7 +177,7 @@ cc.Class({ ...@@ -177,7 +177,7 @@ cc.Class({
this._cantouch = true; this._cantouch = true;
}, },
initView() { initView(cb = null) {
this.initBg(); this.initBg();
// 初始化title // 初始化title
...@@ -224,12 +224,16 @@ cc.Class({ ...@@ -224,12 +224,16 @@ cc.Class({
this.options.addChild(op); this.options.addChild(op);
} }
var self = this; if (!cb) {
this.scheduleOnce(function () { cc.audioEngine.playEffect(this.openMusic, false);
self.options.node.getComponent(cc.Layout).enabled = false; }
}, 0.1);
cc.audioEngine.playEffect(this.openMusic, false); var self = this;
cc.view.setResizeCallback(function () {
console.log("resize");
self.options.node.removeAllChildren();
self.initView(function () {});
});
}, },
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