diff --git a/Design.md b/Design.md index 1e9cd57..71e7feb 100644 --- a/Design.md +++ b/Design.md @@ -232,7 +232,7 @@ The game looks fine on mobile, with a few exceptions, the formations might have - [x] UPDATE: Move the "Click ME to start Game" to after assets load - [ ] UPDATE: Make game over scene background translucent - [ ] UPDATE: Allow user to move past input prompt and menu scene by pressing spacebar or controller buttons -- [ ] UPDATE: Change "click on THIS..." to an audio prompt instead. +- [ ] ~UPDATE: Change "click on THIS..." to an audio prompt instead.~ - [ ] NEW: Add a way for controller to pick between the two options (A for yes and B for no) - [ ] NEW: Added firebase analytics to measure session time. - [ ] NEW: Add explosion animations diff --git a/server.js b/server.js index 04a0d33..effc07d 100644 --- a/server.js +++ b/server.js @@ -4,12 +4,14 @@ * Module dependencies. */ -const express = require('express'); -const path = require('path'); +const express = require("express"); +const path = require("path"); const app = express(); const PORT = process.env.PORT || 3000; -app.use(express.static(path.join(__dirname, 'dist'))); +app.use(express.static(path.join(__dirname, "dist"))); -app.listen(PORT); \ No newline at end of file +app.listen(PORT, () => { + console.log("Listening at port:", PORT); +}); diff --git a/src/index.ts b/src/index.ts index 6d52759..f6390a5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -118,7 +118,14 @@ function resetStage(): void { function showBoot(): void { resetStage(); - const readyText = new Text("Click on THIS text to start game!"); + + const audioPrompt = "Click on THIS text to start game!"; + + const utterance = new SpeechSynthesisUtterance(audioPrompt); + // utterance.voice = + speechSynthesis.speak(utterance); + + const readyText = new Text(audioPrompt); readyText.x = app.renderer.width * 0.5; readyText.y = app.renderer.height * 0.5;