So I’ve created a simple walk cycle in Cocos Studio and wanted to add it to my code.
var HelloWorldLayer = cc.Layer.extend({
sprite:null,
ctor:function () {
this._super();
var size = cc.winSize;
var sp = sp || {};
var gary = new sp.SkeletonAnimation('res/skeletons/gary/gary.json', 'res/skeletons/gary/gary.atlas');
this.addChild(gary, 4);
return true;
}});
But this is saying that sp is undefined? What is sp? How do I create it? Looking at the SpineTest.js file didn’t help either. What do I do to fix this?