Commit a9ea788b authored by 智慧's avatar 智慧

fix:解决龙骨动画播放问题

parent db7fd314
...@@ -727,7 +727,7 @@ ...@@ -727,7 +727,7 @@
} }
], ],
"_armatureName": "armatureName", "_armatureName": "armatureName",
"_animationName": "normal", "_animationName": "",
"_preCacheMode": 0, "_preCacheMode": 0,
"_cacheMode": 0, "_cacheMode": 0,
"playTimes": 1, "playTimes": 1,
...@@ -746,7 +746,7 @@ ...@@ -746,7 +746,7 @@
"__uuid__": "86eb937d-75f7-4b71-8b1d-7c8834c1fa1b" "__uuid__": "86eb937d-75f7-4b71-8b1d-7c8834c1fa1b"
}, },
"_N$_defaultArmatureIndex": 0, "_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 1, "_N$_animationIndex": 0,
"_N$_defaultCacheMode": 0, "_N$_defaultCacheMode": 0,
"_N$timeScale": 1, "_N$timeScale": 1,
"_N$debugBones": false, "_N$debugBones": false,
......
...@@ -84,8 +84,8 @@ cc.Class({ ...@@ -84,8 +84,8 @@ cc.Class({
getDefaultData() { getDefaultData() {
const dataJson = '{"animationName":"DailyConversations"}' // const dataJson = '{"animationName":"DailyConversations"}'
// const dataJson = '{"animationName":"WarmUp"}' const dataJson = '{"animationName":"WarmUp"}'
// const dataJson = '{"animationName":"LettersInLife"}' // const dataJson = '{"animationName":"LettersInLife"}'
// const dataJson = '{"animationName":"Phonics"}' // const dataJson = '{"animationName":"Phonics"}'
// const dataJson = '{"animationName":"LetsBlend"}' // const dataJson = '{"animationName":"LetsBlend"}'
...@@ -185,6 +185,9 @@ cc.Class({ ...@@ -185,6 +185,9 @@ cc.Class({
async showDragon() { async showDragon() {
const nodeName = 'Canvas/' + this.data.animationName; const nodeName = 'Canvas/' + this.data.animationName;
const animationNode = cc.find(nodeName); const animationNode = cc.find(nodeName);
var dragonDisplay = animationNode.getComponent(dragonBones.ArmatureDisplay);
var animNameArr = dragonDisplay.getAnimationNames("armatureName");
dragonDisplay.playAnimation(animNameArr[0], 1);
animationNode.x = cc.find('Canvas').width; animationNode.x = cc.find('Canvas').width;
animationNode.y = 0; animationNode.y = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment