From 78f020dd1b00d8b7d58a85a019a75c702821d87c Mon Sep 17 00:00:00 2001 From: lengstrom Date: Sat, 24 May 2014 16:36:39 -0400 Subject: [PATCH] started to add ability to restart game at any time by pressing enter --- js/input.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/input.js b/js/input.js index e426190..0b84573 100644 --- a/js/input.js +++ b/js/input.js @@ -22,6 +22,9 @@ keypress.register_combo({ keys: "enter", on_keydown: function() { init(); + if (gameState == -1) { + requestAnimFrame(animLoop); + } } });