From 8f66e01820519b951a5392e8bf46aaba766d6e7f Mon Sep 17 00:00:00 2001
From: Paolo Brasolin <paolo.brasolin@eurac.edu>
Date: Wed, 6 Apr 2022 19:30:56 +0200
Subject: [PATCH] feat: #fe make game more discoverable

---
 frontend/src/js/pause_scene.ts   |  6 ++++--
 frontend/src/js/welcome_scene.ts | 11 ++++++++---
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/frontend/src/js/pause_scene.ts b/frontend/src/js/pause_scene.ts
index d09e330..7e945ac 100644
--- a/frontend/src/js/pause_scene.ts
+++ b/frontend/src/js/pause_scene.ts
@@ -39,7 +39,9 @@ export default class PauseScene extends Phaser.Scene {
   }
 
   drawCTA() {
-    const text = "TAKE A BREATH";
+    const text = this.game.device.os.desktop
+      ? "  TAKE A BREATH\nESC key to resume"
+      : "TAKE A BREATH\ntap to resume";
     const title = this.add.text(0, 0, text, {
       font: "bold 24px Courier",
       color: "#ffffff",
@@ -47,7 +49,7 @@ export default class PauseScene extends Phaser.Scene {
     title.setOrigin(0.5, 0.5);
     title.setPosition(
       this.cameras.main.width * 0.5,
-      this.cameras.main.height * 0.5,
+      this.cameras.main.height * 0.6,
     );
   }
 
diff --git a/frontend/src/js/welcome_scene.ts b/frontend/src/js/welcome_scene.ts
index 76634b0..57238c4 100644
--- a/frontend/src/js/welcome_scene.ts
+++ b/frontend/src/js/welcome_scene.ts
@@ -26,7 +26,9 @@ export default class WelcomeScene extends Phaser.Scene {
   }
 
   drawCTA() {
-    const text = "press to start";
+    const text = this.game.device.os.desktop
+      ? "any key to begin\nESC key to pause\n TYPE ALL WORDS"
+      : " tap to begin\n tap to pause\nTYPE ALL WORDS";
     const cta = this.add.text(0, 0, text, {
       font: "bold 32px Courier",
       color: "#ffffff",
@@ -52,8 +54,11 @@ export default class WelcomeScene extends Phaser.Scene {
   }
 
   bindEvents() {
-    this.input.keyboard.once("keyup", this.startFight.bind(this));
-    this.input.once("pointerup", this.startFight.bind(this));
+    if (this.game.device.os.desktop) {
+      this.input.keyboard.once("keyup", this.startFight.bind(this));
+    } else {
+      this.input.once("pointerup", this.startFight.bind(this));
+    }
   }
 
   startFight() {
-- 
GitLab