GrandTabernacleAutoVI/public_html/js/sound.js

12 lines
239 B
JavaScript
Raw Normal View History

2023-12-07 13:45:22 +01:00
class Sound{
constructor(url){
2023-12-08 13:50:49 +01:00
this.sound = new Audio(url);
this.sound.type = "audio/mp3";
2023-12-07 13:45:22 +01:00
}
2023-12-08 13:50:49 +01:00
play(){
2023-12-07 13:45:22 +01:00
this.shootSound.pause()
this.shootSound.currentTime=0;
this.shootSound.play()
}
}