add eraser button and add start calculation logic
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user