Fix that playTimes parameter of playAnimation is no effect sometimes.

This commit is contained in:
zhangbin
2017-03-03 12:06:44 +08:00
parent aaa2ac73b9
commit 71ea7572a0
+2 -1
View File
@@ -463,8 +463,9 @@ dragonBones.ArmatureDisplay = cc.Class({
*/
playAnimation: function(animName, playTimes) {
if (this._sgNode) {
this.playTimes = (playTimes === undefined) ? -1 : playTimes;
this.animationName = animName;
return this._sgNode.animation().play(animName, playTimes);
return this._sgNode.animation().play(animName, this.playTimes);
}
return null;