var node = this.node.getChildByName(“node”);
var spImg = node.getComponent(sp.Skeleton);
// spImg.setAnimation(0, “a1”, true);
var self = this;
var end = function(data,ff,yy) {
if (data.animation.name == "a3") {
}else if (data.animation.name == "a2") {
//spImg.addAnimation(0, "a1", true,0);
}else if (data.animation.name == "a1") {
}
}
spImg.setCompleteListener(end);
if (this._attackTimeId > 0) {
clearInterval(this._attackTimeId);
this._attackTimeId = 0;
}
this._attackTimeId = setInterval(function() {
spImg.setAnimation(0, "a2", false);
spImg.addAnimation(0, "a1", true,0);
}, 500);