Skip to content

Commit

Permalink
Rename difficulty data store
Browse files Browse the repository at this point in the history
  • Loading branch information
Eray Chumak committed Jan 11, 2024
1 parent 177fba8 commit aba6898
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Scenes/DifficultySelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default class DifficultySelectorScene extends Phaser.Scene {
title.setOrigin(0);

const btnEasy = new TextButton(this, title.x, title.y * 1.5, "Easy", () => {
sessionStorage.setItem("difficulty", "easy");
sessionStorage.setItem("gameDifficulty", "easy");
this.#startGame();
});

Expand All @@ -129,7 +129,7 @@ export default class DifficultySelectorScene extends Phaser.Scene {
);

const btnNormal = new TextButton(this, (btnEasy.x + btnEasy.width) + 150, btnEasy.y, "Normal", () => {
sessionStorage.setItem("difficulty", "normal");
sessionStorage.setItem("gameDifficulty", "normal");
this.#startGame();
});

Expand All @@ -141,7 +141,7 @@ export default class DifficultySelectorScene extends Phaser.Scene {
);

const btnHard = new TextButton(this, (btnNormal.x + btnNormal.width) + 150, btnNormal.y, "Hard", () => {
sessionStorage.setItem("difficulty", "hard");
sessionStorage.setItem("gameDifficulty", "hard");
this.#startGame();
});

Expand Down

0 comments on commit aba6898

Please sign in to comment.