game only resets score when logged in
This commit is contained in:
parent
641af661b4
commit
a0a869781e
1 changed files with 9 additions and 9 deletions
|
|
@ -249,14 +249,14 @@ function checkRaspberryScore(): void {
|
|||
* Resets the score if game is started
|
||||
*/
|
||||
function resetScore(): void {
|
||||
if (hasDied) {
|
||||
if (!hasDied || localStorage.getItem("frontend-ready") == "false") return;
|
||||
|
||||
hasDied = false;
|
||||
score = 0;
|
||||
hasAlreadyScored = false;
|
||||
startTime = Date.now();
|
||||
exportToLocalStorage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for key events.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue