提供对SpriteAnimator中的一些字段的访问

This commit is contained in:
yhh
2020-07-20 13:46:58 +08:00
parent e76d5815f2
commit 2a38858838
7 changed files with 22 additions and 2 deletions

View File

@@ -2007,6 +2007,13 @@ var SpriteAnimator = (function (_super) {
enumerable: true,
configurable: true
});
Object.defineProperty(SpriteAnimator.prototype, "animations", {
get: function () {
return this._animations;
},
enumerable: true,
configurable: true
});
SpriteAnimator.prototype.addAnimation = function (name, animation) {
if (!this.sprite && animation.sprites.length > 0)
this.setSprite(animation.sprites[0]);