From e2e2aec59eae4d00b7f60376ce46245909141ccf Mon Sep 17 00:00:00 2001 From: clickthisnick Date: Sat, 1 Jun 2019 07:11:41 -0400 Subject: [PATCH 1/2] Move camera rotation key to shift --- static/index.html | 8 ++++---- static/wasm_exec.js | 2 +- wasm/bundle.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/static/index.html b/static/index.html index fb3251d..8c71e91 100644 --- a/static/index.html +++ b/static/index.html @@ -19,9 +19,9 @@ alert(` Controls: - Arrow Keys: Move Player - - Ctrl + Arrow Keys: Move Camera + - Shift + Arrow Keys: Move Camera - Space: Jump - + Rules: 1. Get as high up as you can! 2. Avoid the red square! @@ -118,7 +118,7 @@ - +

Move Player To:

@@ -138,4 +138,4 @@

Move Player To:

- \ No newline at end of file + diff --git a/static/wasm_exec.js b/static/wasm_exec.js index e31c17f..29427d9 100644 --- a/static/wasm_exec.js +++ b/static/wasm_exec.js @@ -499,4 +499,4 @@ process.exit(1); }); } -})(); \ No newline at end of file +})(); diff --git a/wasm/bundle.go b/wasm/bundle.go index 4299c61..79e070f 100644 --- a/wasm/bundle.go +++ b/wasm/bundle.go @@ -92,7 +92,7 @@ func main() { core.GameInputEditModeMoveDown: false, } - if isKeyDownMap["ControlLeft"] { + if isKeyDownMap["ShiftLeft"] { if isKeyDownMap["ArrowUp"] { inputMap[core.GameInputCameraZoomIn] = true } From a6a618788c5acb1cd3435af1ecd3f1aef555dd4e Mon Sep 17 00:00:00 2001 From: clickthisnick Date: Sat, 1 Jun 2019 07:19:58 -0400 Subject: [PATCH 2/2] Prompt to replay --- static/index.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/static/index.html b/static/index.html index 8c71e91..3565f5b 100644 --- a/static/index.html +++ b/static/index.html @@ -9,11 +9,19 @@ }); function onGameOver() { - alert(` - GAME OVER! - - (refresh to try again) - `); + if (confirm(` + GAME OVER! + + Would you like to play again? + `)) { + location.reload(); + } else { + alert(` + GAME OVER! + + (refresh to try again) + `); + } } alert(`