Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

如何给龙骨预设指定骨骼文件和图集

$
0
0

@zero870 写道:

取一个含龙骨动画的预设 其他逻辑都一样 只想换个 龙骨动画 应该怎么写?

this._enemy = cc.instantiate(this.enemyPrefab);
this.node.addChild(this._enemy);

let armatureDisplay = this._enemy.getComponent(dragonBones.ArmatureDisplay);

armatureDisplay.dragonAsset = “url dragonAsset”;
armatureDisplay.dragonAtlasAsset = “url dragonAtlasAsset”;

armatureDisplay.armatureName = "monster001";

armatureDisplay.playAnimation('standby', -1);

直接指定 并不行 应该怎么写???

帖子: 2

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>