diff --git a/app/Game/Client/GameController.js b/app/Game/Client/GameController.js index f1a6bc9..35b8003 100755 --- a/app/Game/Client/GameController.js +++ b/app/Game/Client/GameController.js @@ -28,9 +28,18 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Notificat this.stats = new Stats(); this.stats.setMode(0); document.body.appendChild(this.stats.domElement); + var p = document.createElement("p"); var button = document.createElement("button"); - button.onclick = inspector.resetLevel; - document.body.appendChild(button); + button.innerHTML = "Reset level"; + button.onclick = function() { + inspector.resetLevel(); + button.disabled = true;; + setTimeout(function() { + button.disabled = false; + }, 1000 * 30); + } + p.appendChild(button); + document.body.appendChild(p); }; GameController.prototype.destruct = function() {