From 6a6d5e6d1555f0f4f3df2bc8a5e8ffe858bb1b32 Mon Sep 17 00:00:00 2001 From: RubixYouTube <111435714+RubixYouTube@users.noreply.github.com> Date: Sun, 22 Sep 2024 14:45:27 -0500 Subject: [PATCH] More achievements. v0.2.4a --- index.html | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 17c74ed..ef5c377 100644 --- a/index.html +++ b/index.html @@ -93,6 +93,8 @@ const popup2 = document.getElementById('popup2'); const popup3 = document.getElementById('popup3'); const achievement = document.getElementById('achievement'); + const achievement2 = document.getElementById('achievement2'); + const achievement3 = document.getElementById('achievement3'); const saveData = localStorage.getItem('saveData'); if (saveData) { @@ -115,6 +117,18 @@ showPopup('Achievement Complete: First Hertz'); } + if (hz >= 60 && !achievement2.classList.contains('completed')) { + achievement2.classList.add('completed'); + achievement2.textContent = 'I can hear now'; + showPopup('Achievement Complete: I can hear now'); + } + + if (hz >= 2000 && !achievement3.classList.contains('completed')) { + achievement3.classList.add('completed'); + achievement3.textContent = 'beep thing XD'; + showPopup('Achievement Complete: beep thing XD'); + } + saveGame(); } @@ -315,6 +329,8 @@