tbalouet / WebVRDefender

A game project to show adaptive gameplay on multiple devices over WebVR
Apache License 2.0
6 stars 0 forks source link

Manage sounds events #9

Open tbalouet opened 7 years ago

tbalouet commented 7 years ago

Manage to play sounds on events kill/background/... with the user input needed on mobile

Utopiah commented 7 years ago

correct I'll dispatch play() then pause() on all audio entities if on mobile after a user interaction

this might not be trivial though since sounds are added dynamically cf https://github.com/tbalouet/WebVRDefender/blob/dev/client/js/components/enemy.js#L87 , might have to use a sound pool ...

Utopiah commented 7 years ago

Sound on kill has been commented out in the enemy component. Please clarify why before I add more of those on hit, kill and even on click for the shot.