Can someone please give me some help/hint on what is going on here ?
This is a simple count down time before the game starts. all the lblX are TTFLabels
var countDownSpeed = 0.5;
var t = this;
this.runAction(cc.Sequence.create(
//THREE
cc.DelayTime.create(countDownSpeed),
cc.CallFunc.create(function(node) {
t.addChild(lbl3, 500);
lbl3.runAction(cc.ScaleTo.create(countDownSpeed, 0, 0));
}, this),
//TWO
cc.DelayTime.create(countDownSpeed),
cc.CallFunc.create(function(node) {
t.addChild(lbl2, 500);
lbl2.runAction(cc.ScaleTo.create(countDownSpeed, 0,0));
}, this),
//ONE
cc.DelayTime.create(countDownSpeed),
cc.CallFunc.create(function(node) {
t.addChild(lbl1, 500);
lbl1.runAction(cc.ScaleTo.create(countDownSpeed, 0,0));
}, this),
//GO
cc.DelayTime.create(countDownSpeed),
cc.CallFunc.create(function(node) {
t.addChild(lblGo, 500);
lblGo.runAction(cc.ScaleTo.create(countDownSpeed, 0, 0));
t.schedule(t.gameLogic, spawnRate);
t.scheduleUpdate();
}, this)
));
Error
cocos2d: jsb: ERROR: File /Users/macuser/SDK/cocos2d-x-3.0alpha1/cocos/scripting/auto-generated/js-bindings/jsb_cocos2dx_auto.cpp: Line: 3233, Function: js_cocos2dx_Node_addChild
cocos2d: Invalid Native Object
cocos2d: JS: /Users/macuser/Library/Application Support/iPhone Simulator/7.0.3/Applications/56FF9F20-FECC-441D-B26D-9709BACAE1F5/iOS.app/src/Game.js:174:Error: Invalid Native Object