Add water splash sounds

This commit is contained in:
Ketchetwahmeegwun T. Southall 2022-01-30 15:48:50 -08:00
parent cf26a233be
commit 8b5de4a2c1

View File

@ -71,6 +71,9 @@ export class AnimalEntity extends Entity {
p[0] += ((this.sprite.frame?.width??0)/2??0) - 4
p[1] += ((this.sprite.frame?.height??0)/2??0)
ctx.addEntity(new PuddleEntity('effects.water.ripple.small.0'), 'ground', p[0], p[1])
let v = 1 + Math.floor(Math.random() * 2)
playSound(`action/splash-v${v}`, 0.25+Math.floor(Math.random()*.25))
}
this.puddleTimer = 0
}