aboutsummaryrefslogtreecommitdiff
path: root/sfx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx')
-rw-r--r--sfx/click.mp3bin0 -> 4461 bytes
-rw-r--r--sfx/crash.mp3bin0 -> 9453 bytes
-rw-r--r--sfx/intro.mp3bin0 -> 9026 bytes
-rw-r--r--sfx/last.mp3bin0 -> 8168 bytes
-rw-r--r--sfx/menu.mp3bin0 -> 5037 bytes
-rw-r--r--sfx/pass.mp3bin0 -> 10884 bytes
-rw-r--r--sfx/pause.mp3bin0 -> 11565 bytes
-rw-r--r--sfx/sfx.js60
-rw-r--r--sfx/win.mp3bin0 -> 3361 bytes
9 files changed, 60 insertions, 0 deletions
diff --git a/sfx/click.mp3 b/sfx/click.mp3
new file mode 100644
index 0000000..710c85b
--- /dev/null
+++ b/sfx/click.mp3
Binary files differ
diff --git a/sfx/crash.mp3 b/sfx/crash.mp3
new file mode 100644
index 0000000..1ce02e9
--- /dev/null
+++ b/sfx/crash.mp3
Binary files differ
diff --git a/sfx/intro.mp3 b/sfx/intro.mp3
new file mode 100644
index 0000000..5d90f31
--- /dev/null
+++ b/sfx/intro.mp3
Binary files differ
diff --git a/sfx/last.mp3 b/sfx/last.mp3
new file mode 100644
index 0000000..2595f73
--- /dev/null
+++ b/sfx/last.mp3
Binary files differ
diff --git a/sfx/menu.mp3 b/sfx/menu.mp3
new file mode 100644
index 0000000..f48daa8
--- /dev/null
+++ b/sfx/menu.mp3
Binary files differ
diff --git a/sfx/pass.mp3 b/sfx/pass.mp3
new file mode 100644
index 0000000..04caca0
--- /dev/null
+++ b/sfx/pass.mp3
Binary files differ
diff --git a/sfx/pause.mp3 b/sfx/pause.mp3
new file mode 100644
index 0000000..aedcd13
--- /dev/null
+++ b/sfx/pause.mp3
Binary files differ
diff --git a/sfx/sfx.js b/sfx/sfx.js
new file mode 100644
index 0000000..9ed6418
--- /dev/null
+++ b/sfx/sfx.js
@@ -0,0 +1,60 @@
+const Sound = {
+ pass: () => {
+ new Audio(kresources.sfx['pass']).play()
+ },
+ last: () => {
+ new Audio(kresources.sfx['last']).play()
+ },
+ crash: () => {
+ new Audio(kresources.sfx['crash']).play()
+ },
+ win: () => {
+ new Audio(kresources.sfx['win']).play()
+ },
+ click: () => {
+ new Audio(kresources.sfx['click']).play()
+ },
+ menu: () => {
+ new Audio(kresources.sfx['menu']).play()
+ },
+ pause: () => {
+ new Audio(kresources.sfx['pause']).play()
+ },
+ start: () => {
+ new Audio(kresources.sfx['start']).play()
+ },
+ intro: () => {
+ new Audio(kresources.music['start'].file).play()
+ },
+}
+
+shouldMusicPlay = true;
+
+setInterval(() => {
+ try {
+ if (typeof document.getElementById('music') !== "undefined" && typeof document.getElementById('music') !== "null") {
+ if (shouldMusicPlay) {
+ document.getElementById('music').play();
+ }
+ if (!shouldMusicPlay) {
+ document.getElementById('music').pause();
+ }
+ }
+ if (typeof b !== "undefined" && typeof b !== "null") {
+ if (shouldMusicPlay) {
+ b.play();
+ }
+ if (!shouldMusicPlay) {
+ b.pause();
+ }
+ }
+ if (typeof me !== "undefined" && typeof me !== "null") {
+ if (me.currentTime < me.duration) {
+ me.play();
+ }
+ if (me.currentTime >= me.duration) {
+ me.pause();
+ }
+ }
+ } catch (e) {}
+}, 200) \ No newline at end of file
diff --git a/sfx/win.mp3 b/sfx/win.mp3
new file mode 100644
index 0000000..9a7ae56
--- /dev/null
+++ b/sfx/win.mp3
Binary files differ