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 = 8;
|
||||
let resultView;
|
||||
let topLogoWidth;
|
||||
let muteIconWidth;
|
||||
@@ -576,11 +577,11 @@ import Layout from '../../layouts/Layout.astro';
|
||||
// console.log(match)
|
||||
if(match){
|
||||
scoreTotal++;
|
||||
resultView = this.add.text(window.innerWidth / 2 - 100, window.innerHeight / 2 - 100, `Your Score: ${scoreTotal}`, {font: `24px`, fill: `#7c4c23`}).setVisible(false);
|
||||
// console.log(scoreTotal)
|
||||
}
|
||||
if(counter === 8){
|
||||
// console.log(counter)
|
||||
resultView = this.add.text(window.innerWidth / 2 - 100, window.innerHeight / 2 - 100, `Your Score: ${scoreTotal}`, {font: `24px`, fill: `#7c4c23`}).setVisible(false);
|
||||
submitButton.setVisible(true);
|
||||
retryButton.setVisible(true);
|
||||
resultView.setVisible(true);
|
||||
|
||||
Reference in New Issue
Block a user