Hello, first time using cocos2d-X. I’m trying out cocos creator and I have this code attached to my object and it’s being compiled successfully:
cc.Class({
extends: cc.Component,
properties: {
},
// use this for initialization
onLoad: function () {
},
start: function () {
var action = cc.moveBy(2, 100, 200);
node.runAction(action);
},
// called every frame, uncomment this function to activate update callback
update: function (dt) {
},
});
But whenever I run the project, the object just instantly disappears, what am I doing wrong?!