Commit aef1b834 authored by 智慧's avatar 智慧

feat:添加自动进入播放骨骼动画

parent a0fc698a
......@@ -730,7 +730,7 @@
"_animationName": "finishdragon",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"playTimes": 1,
"premultipliedAlpha": false,
"_armatureKey": "e5113a64-f76c-4d4f-a04d-f45ceb42c0be#1a65d967-5f21-47a9-9791-5df3e1da7041",
"_accTime": 0,
......
......@@ -83,7 +83,7 @@ cc.Class({
getDefaultData() {
const dataJson = '{"animationName":"WarmUp"}'
const dataJson = '{"animationName":"Greetings"}'
const data = JSON.parse(dataJson);
return data;
},
......@@ -161,12 +161,13 @@ cc.Class({
},
initBtn() {
const bg = cc.find('Canvas/bg');
bg.addComponent(cc.Button);
//节点中添加了button组件 则可以添加click事件监听das
bg.on('click', async () => {
await this.showDragon();
})
this.showDragon();
// const bg = cc.find('Canvas/bg');
// bg.addComponent(cc.Button);
// //节点中添加了button组件 则可以添加click事件监听das
// bg.on('click', async () => {
// await this.showDragon();
// })
},
async showDragon() {
......
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