isRunning function for Sprite object

This commit is contained in:
Лаврёнов Антон
2014-03-02 10:46:45 +08:00
parent 86178185bc
commit 53ac9329de
2 changed files with 51 additions and 0 deletions

View File

@@ -136,6 +136,15 @@
this.anim.stop();
clearInterval(this.interval);
},
/**
* determine if animation of sprite is running or not. returns true or false
* @method
* @memberof Kinetic.Animation.prototype
* @returns {Boolean}
*/
isRunning: function() {
return this.anim.isRunning();
},
_updateIndex: function() {
var index = this.frameIndex(),
animation = this.getAnimation(),