diff --git a/readme.md b/readme.md
index e82483b..7d29ea2 100644
--- a/readme.md
+++ b/readme.md
@@ -15,11 +15,12 @@ https://mathieuher.github.io/RetroSki
* Arrow left -> Left carving
* Arrow right -> Right carving
* Space bar -> Braking/Side sliding
+
* R -> Go back to event menu (allow to restart the race)
+* D -> Toggle debug mode
### Anytime
* Escape -> Quit and go back to event setup
-* D -> Toggle debug mode
## 📘 Gamer guide
### Event setup
diff --git a/src/game.ts b/src/game.ts
index 2a04db5..77682fb 100644
--- a/src/game.ts
+++ b/src/game.ts
@@ -49,16 +49,14 @@ export class Game extends Engine {
onPreUpdate(_engine: Engine, _delta: number): void {
if (_engine.input.keyboard.wasPressed(Config.DEBUG_KEY)) {
- _engine.showDebug(!_engine.isDebug);
+ if (_engine.scenes['race']?.isCurrentScene()) {
+ _engine.showDebug(!_engine.isDebug);
+ }
}
if (_engine.input.keyboard.wasPressed(Config.EXIT_KEY)) {
this.restartGame();
}
-
- if (_engine.input.keyboard.wasPressed(Config.SOUND_KEY)) {
- // this.soundPlayer.toggleSound();
- }
}
private getLoader(): Loader {
diff --git a/src/images/icons/android-chrome-192x192.png b/src/images/icons/android-chrome-192x192.png
new file mode 100644
index 0000000..f15f993
Binary files /dev/null and b/src/images/icons/android-chrome-192x192.png differ
diff --git a/src/images/icons/android-chrome-512x512.png b/src/images/icons/android-chrome-512x512.png
new file mode 100644
index 0000000..cdfb2f6
Binary files /dev/null and b/src/images/icons/android-chrome-512x512.png differ
diff --git a/src/images/icons/apple-touch-icon.png b/src/images/icons/apple-touch-icon.png
new file mode 100644
index 0000000..d0a1c5d
Binary files /dev/null and b/src/images/icons/apple-touch-icon.png differ
diff --git a/src/images/icons/favicon-16x16.png b/src/images/icons/favicon-16x16.png
new file mode 100644
index 0000000..8b62999
Binary files /dev/null and b/src/images/icons/favicon-16x16.png differ
diff --git a/src/images/icons/favicon-32x32.png b/src/images/icons/favicon-32x32.png
new file mode 100644
index 0000000..5350beb
Binary files /dev/null and b/src/images/icons/favicon-32x32.png differ
diff --git a/src/images/icons/favicon.ico b/src/images/icons/favicon.ico
new file mode 100644
index 0000000..8918780
Binary files /dev/null and b/src/images/icons/favicon.ico differ
diff --git a/src/images/logo.png b/src/images/logos/logo.png
similarity index 100%
rename from src/images/logo.png
rename to src/images/logos/logo.png
diff --git a/src/images/small_logo.png b/src/images/logos/small_logo.png
similarity index 100%
rename from src/images/small_logo.png
rename to src/images/logos/small_logo.png
diff --git a/src/images/final_pole.png b/src/images/sprites/final_pole.png
similarity index 100%
rename from src/images/final_pole.png
rename to src/images/sprites/final_pole.png
diff --git a/src/images/old_skier.png b/src/images/sprites/old_skier.png
similarity index 100%
rename from src/images/old_skier.png
rename to src/images/sprites/old_skier.png
diff --git a/src/images/old_skier_braking.png b/src/images/sprites/old_skier_braking.png
similarity index 100%
rename from src/images/old_skier_braking.png
rename to src/images/sprites/old_skier_braking.png
diff --git a/src/images/old_skier_carving.png b/src/images/sprites/old_skier_carving.png
similarity index 100%
rename from src/images/old_skier_carving.png
rename to src/images/sprites/old_skier_carving.png
diff --git a/src/images/old_skier_sliding.png b/src/images/sprites/old_skier_sliding.png
similarity index 100%
rename from src/images/old_skier_sliding.png
rename to src/images/sprites/old_skier_sliding.png
diff --git a/src/images/pole_blue.png b/src/images/sprites/pole_blue.png
similarity index 100%
rename from src/images/pole_blue.png
rename to src/images/sprites/pole_blue.png
diff --git a/src/images/pole_passed_blue.png b/src/images/sprites/pole_passed_blue.png
similarity index 100%
rename from src/images/pole_passed_blue.png
rename to src/images/sprites/pole_passed_blue.png
diff --git a/src/images/pole_passed_red.png b/src/images/sprites/pole_passed_red.png
similarity index 100%
rename from src/images/pole_passed_red.png
rename to src/images/sprites/pole_passed_red.png
diff --git a/src/images/pole_red.png b/src/images/sprites/pole_red.png
similarity index 100%
rename from src/images/pole_red.png
rename to src/images/sprites/pole_red.png
diff --git a/src/images/pole_touched_blue.png b/src/images/sprites/pole_touched_blue.png
similarity index 100%
rename from src/images/pole_touched_blue.png
rename to src/images/sprites/pole_touched_blue.png
diff --git a/src/images/pole_touched_red.png b/src/images/sprites/pole_touched_red.png
similarity index 100%
rename from src/images/pole_touched_red.png
rename to src/images/sprites/pole_touched_red.png
diff --git a/src/images/skier.png b/src/images/sprites/skier.png
similarity index 100%
rename from src/images/skier.png
rename to src/images/sprites/skier.png
diff --git a/src/images/skier_braking.png b/src/images/sprites/skier_braking.png
similarity index 100%
rename from src/images/skier_braking.png
rename to src/images/sprites/skier_braking.png
diff --git a/src/images/skier_carving.png b/src/images/sprites/skier_carving.png
similarity index 100%
rename from src/images/skier_carving.png
rename to src/images/sprites/skier_carving.png
diff --git a/src/images/skier_jumping.png b/src/images/sprites/skier_jumping.png
similarity index 100%
rename from src/images/skier_jumping.png
rename to src/images/sprites/skier_jumping.png
diff --git a/src/images/skier_sliding.png b/src/images/sprites/skier_sliding.png
similarity index 100%
rename from src/images/skier_sliding.png
rename to src/images/sprites/skier_sliding.png
diff --git a/src/resources.ts b/src/resources.ts
index 9f8e150..b306e49 100644
--- a/src/resources.ts
+++ b/src/resources.ts
@@ -1,16 +1,16 @@
import { ImageSource, Sound } from "excalibur";
-import skier from "./images/skier.png";
-import skierCarving from "./images/skier_carving.png";
-import skierSliding from "./images/skier_sliding.png";
-import skierBraking from "./images/skier_braking.png";
-import skierJumping from "./images/skier_jumping.png";
-import poleRed from "./images/pole_red.png";
-import poleBlue from "./images/pole_blue.png";
-import poleTouchedRed from "./images/pole_touched_red.png";
-import poleTouchedBlue from "./images/pole_touched_blue.png";
-import polePassedRed from "./images/pole_passed_red.png";
-import polePassedBlue from "./images/pole_passed_blue.png";
-import finalPole from "./images/final_pole.png";
+import skier from "./images/sprites/skier.png";
+import skierCarving from "./images/sprites/skier_carving.png";
+import skierSliding from "./images/sprites/skier_sliding.png";
+import skierBraking from "./images/sprites/skier_braking.png";
+import skierJumping from "./images/sprites/skier_jumping.png";
+import poleRed from "./images/sprites/pole_red.png";
+import poleBlue from "./images/sprites/pole_blue.png";
+import poleTouchedRed from "./images/sprites/pole_touched_red.png";
+import poleTouchedBlue from "./images/sprites/pole_touched_blue.png";
+import polePassedRed from "./images/sprites/pole_passed_red.png";
+import polePassedBlue from "./images/sprites/pole_passed_blue.png";
+import finalPole from "./images/sprites/final_pole.png";
import winterSound from "./sounds/winter.mp3";
import startRaceSound from "./sounds/start_race.mp3";
import finishRaceSound from "./sounds/finish_race.mp3";
diff --git a/webmanifest b/webmanifest
new file mode 100644
index 0000000..7de0e00
--- /dev/null
+++ b/webmanifest
@@ -0,0 +1,19 @@
+{
+ "name": "RetroSki",
+ "short_name": "RetroSki",
+ "icons": [
+ {
+ "src": "/android-chrome-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "/android-chrome-512x512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }
+ ],
+ "theme_color": "#4a8291",
+ "background_color": "#b0d4dd",
+ "display": "standalone"
+}
\ No newline at end of file