haptics (fixes #13)

This commit is contained in:
Kevin Ngo
2018-09-20 04:01:41 -07:00
parent b52c833bf7
commit 5f9d4da31d
3 changed files with 8 additions and 4 deletions

View File

@@ -13,7 +13,9 @@ AFRAME.registerSystem('play-sound', {
},
playSound: function (sound, volume) {
this.createPool(sound, volume);
if (!this.pools[sound]) {
this.createPool(sound, volume);
}
this.pools[sound].play();
this.lastSoundPlayed = sound;