Merge pull request #530 from urkerab/faint-remove-elem

Always remove the element when a sprite faints
This commit is contained in:
Guangcong Luo
2015-10-31 03:02:54 -05:00

View File

@@ -1146,6 +1146,11 @@ var Sprite = (function () {
opacity: 0
}, 'accel');
this.battle.activityWait(this.elem);
var self = this;
this.elem.promise().done(function() {
self.elem.remove();
self.elem = null;
});
};
Sprite.prototype.delay = function (time) {
this.elem.delay(time);