add eraser button and add start calculation logic

This commit is contained in:
Suvodip
2024-09-06 20:05:34 +05:30
parent 2fe965cd99
commit d2a1edd333
21 changed files with 291 additions and 139 deletions

View File

@@ -63,6 +63,7 @@ import Layout from '../../layouts/Layout.astro';
let formattedDateTime;
let shortUniqueID;
let scoreTotal = 0;
let maxScore = 4;
let resultView;
let topLogoWidth;
let muteIconWidth;
@@ -552,10 +553,10 @@ import Layout from '../../layouts/Layout.astro';
if(match !== undefined){
scoreTotal++;
// console.log("Score Total", scoreTotal)
resultView = this.add.text(window.innerWidth / 2 - 100, window.innerHeight / 2 - 100, `Your Score: ${scoreTotal}`, {font: `24px`, fill: `#7c4c23`});
resultView.setVisible(false);
// resultView.setVisible(false);
}
if(counter === 4){
resultView = this.add.text(window.innerWidth / 2 - 100, window.innerHeight / 2 - 100, `Your Score: ${scoreTotal}`, {font: `24px`, fill: `#7c4c23`});
const overlap = document.getElementById("overlap");
overlap.style.display = "block";
// console.log(counter)