-
webkukLikes 0Problem Description
var SplashScene = cc.Scene.extend({
onEnter: function() {
this._super();
splashAction = new cc.Sequence([cc.DelayTime(15),cc.CallFunc(cc.director.runScene(new cc.TransitionTurnOffTiles(1,new MenuScene())))]);
this.runAction(splashAction);
}
});
i think this code do 15 sec delay and after this do transition. But delay dont work. Where is my problem?
-
Sonar Systems adminLikes 0
Have you tried the delay but instead of CallFunc just do a random action to see if it works.
-
webkukLikes 0
How it work cc.Sequence([A,B,C])?
after finished A action start B action?
-
Sonar Systems adminLikes 0
Check out the link below and look at the last few actions.
-
webkukLikes 0
i read it, but i understand why my code not work. can u write for me example sequence with 15 sec delay and after this transition on anoither scene?
-
Sonar Systems adminLikes 0
Trying scheduling multiple methods to do each task. The next method is called at the end of the previous tasks method.
-
webkukLikes 1
I did it!
var SplashScene = cc.Scene.extend({
ctor: function() {
this._super();
this.runAction(cc.sequence(cc.delayTime(5),cc.callFunc(this.gotoMenu)));
},
gotoMenu: function(){
cc.director.runScene(new cc.TransitionTurnOffTiles(1,new MenuScene()));
}
});
-
Sonar Systems adminLikes 0
GREAT TO HEAR :D
Login to reply