From 5a8473c21d842fc13ff01c2c218f1a239a2eb2ab Mon Sep 17 00:00:00 2001 From: Robert Chen Date: Sun, 1 Dec 2013 02:22:53 -0800 Subject: [PATCH] Restore click, but only at 100% --- js/screens.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/screens.js b/js/screens.js index 69e486a..b0192c3 100755 --- a/js/screens.js +++ b/js/screens.js @@ -43,13 +43,11 @@ function LoadingScreen( stage, gameState ){ that.done.addEventListener( "mouseover", function(){ document.body.style.cursor='pointer'; } ); that.done.addEventListener( "mouseout", function(){ document.body.style.cursor='default'; } ); - that.done.addEventListener( "click", function(){ gameState.pubsub.publish("SwitchScreen", "MainScreen"); }); + that.done.addEventListener( "click", function(){ if( (percent * 25).toFixed(2) == 100 ) gameState.pubsub.publish("SwitchScreen", "MainScreen"); }); - /* that.turkeyState[4].addEventListener( "mouseover", function(){ document.body.style.cursor='pointer'; } ); that.turkeyState[4].addEventListener( "mouseout", function(){ document.body.style.cursor='default'; } ); - that.turkeyState[4].addEventListener( "click", function(){ gameState.pubsub.publish("SwitchScreen", "MainScreen"); }); - */ + that.turkeyState[4].addEventListener( "click", function(){ if( (percent * 25).toFixed(2) == 100 ) gameState.pubsub.publish("SwitchScreen", "MainScreen"); }); } });