aboutsummaryrefslogtreecommitdiff
path: root/sfx
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-05 17:21:23 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-05 17:21:23 +0200
commitd5a620cf09b835db2bccd99556525c90b458719f (patch)
tree1507f96be0413bd20026878890b0c1ad438e51d2 /sfx
parent44210691ee8444509ac466a362337af77f2bcd49 (diff)
downloadkartik-client-d5a620cf09b835db2bccd99556525c90b458719f.tar.gz
kartik-client-d5a620cf09b835db2bccd99556525c90b458719f.tar.bz2
kartik-client-d5a620cf09b835db2bccd99556525c90b458719f.zip
i18n for 21.08
Diffstat (limited to 'sfx')
-rw-r--r--sfx/sfx.js118
1 files changed, 59 insertions, 59 deletions
diff --git a/sfx/sfx.js b/sfx/sfx.js
index 9ed6418..71e3fe3 100644
--- a/sfx/sfx.js
+++ b/sfx/sfx.js
@@ -1,60 +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) {}
+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