this.runAction(cc.Sequence.create(cc.DelayTime.create(10), this.addChild(layers.startUI)));
失败了,没有延时直接跳出了startUI。
var GameScene = cc.Scene.extend({
onEnter : function () {
this._super();
var bg = new cc.Sprite(“bg.png”);
bg.anchorX = 0.5;
bg.anchorY = 1;
bg.x = cc.winSize.width/2;
bg.y = cc.winSize.height;
this.addChild(bg);
layers.startUI = new StartUI();
this.runAction(cc.Sequence.create(cc.DelayTime.create(10), this.addChild(layers.startUI)));
}
});