Commit 62a439c3 authored by liujiangnan's avatar liujiangnan

feat: 动画

parent 5b2be6ee
......@@ -3238,7 +3238,9 @@
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_N$target": {
"__id__": 64
},
"_id": "38DvLT3M5GEbCCy6xE11be"
},
{
......
......@@ -134,14 +134,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
jumpToBundle('NJ_YouLeChang');
});
const btnMonkey = cc.find('Canvas/bg/bg_monkey');
buttonOnClick(btnMonkey, () => {
const happy = cc.find('Canvas/bg/happy');
const talk = cc.find('Canvas/bg/talk');
buttonOnClick(happy, () => {
if (this.playId) {
cc.audioEngine.stop(this.playId);
}
talk.active = true;
cc.audioEngine.setMusicVolume(0.3);
this.playId = cc.audioEngine.play(this.monkyWait, null, 1);
cc.audioEngine.setFinishCallback(this.playId, () => {
talk.active = false;
cc.audioEngine.setMusicVolume(1);
})
});
......
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