Not set the default animation name at runtime.

This commit is contained in:
zhangbin
2016-11-10 15:52:52 +08:00
parent c1b6c7ad86
commit e9c75d45ae
+9 -1
View File
@@ -130,7 +130,15 @@ dragonBones.ArmatureDisplay = cc.Class({
set : function (value) {
this._armatureName = value;
var animNames = this.getAnimationNames(this._armatureName);
this.animationName = animNames[0];
if (!this.animationName || animNames.indexOf(this.animationName) < 0) {
if (CC_EDITOR) {
this.animationName = animNames[0];
} else {
// Not use default animation name at runtime
this.animationName = '';
}
}
this._refresh();
},
visible: false