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 = 8;
let resultView;
let topLogoWidth;
let muteIconWidth;
@@ -599,10 +600,10 @@ import Layout from '../../layouts/Layout.astro';
// console.log(match)
if(match !== undefined){
scoreTotal++;
resultView = this.add.text(window.innerWidth / 2 - 100, window.innerHeight / 2 - 100, `Your Score: ${scoreTotal}`, {font: `24px`, fill: `#7c4c23`}).setVisible(false);
// console.log("Score Total", scoreTotal)
}
if(counter === 8){
resultView = this.add.text(window.innerWidth / 2 - 100, window.innerHeight / 2 - 100, `Your Score: ${scoreTotal}`, {font: `24px`, fill: `#7c4c23`}).setVisible(false);
// console.log(counter)
submitButton.setVisible(true);
retryButton.setVisible(true);