Commit 57f9a61e authored by wjf's avatar wjf

l

parent 240ddd18
......@@ -1522,6 +1522,11 @@
"url": "assets/showoff1.jpg",
"type": "image",
"name": "showoff1_jpg"
},
{
"url": "assets/sounds/bonusShoot.mp3",
"type": "sound",
"name": "bonusShoot_mp3"
}
]
}
\ No newline at end of file
......@@ -41,7 +41,7 @@ export class BonusShootAni extends egret.DisplayObjectContainer {
.to({ x: p[0], y: p[1] }, 300)
.call(() => {
callback();
// playSound(SoundType.bonusShoot)
playSound(SoundType.bonusShoot)
this.shoot.visible = false;
this.imageAni.visible = true;
this.imageAni.play(() => {
......
......@@ -30,7 +30,7 @@ export const playBg = async () => {
if (bgChannel) return;
if (loading) return;
loading = true;
const bg = await RES.getResAsync('bg_mp3');
const bg = await RES.getResAsync('mapBg_mp3');
bgChannel = bg.play();
loading = false;
}
......@@ -52,6 +52,7 @@ export enum SoundType {
fail = 'fail',
playBg = 'playBg',
line = 'line',
bonusShoot = 'bonusShoot',
}
export const playSound = (type: SoundType) => {
......
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