From 32b803443e5cff91869218723e3b782a24f1f05d Mon Sep 17 00:00:00 2001 From: William Date: Sat, 18 Apr 2020 19:16:41 -0400 Subject: [PATCH] Added State Switching --- docs/assets/js/titleScreen/titleScreen.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/assets/js/titleScreen/titleScreen.js b/docs/assets/js/titleScreen/titleScreen.js index 84be1a4..3e8e08e 100644 --- a/docs/assets/js/titleScreen/titleScreen.js +++ b/docs/assets/js/titleScreen/titleScreen.js @@ -24,7 +24,7 @@ function handleTitleScreen(){ function handleMainScreen(){ if(timer > 20){ if(rectpoint({x:415, y:200, w: 300, h: 50}, {x:cursor.x, y:cursor.y}) && mouseDown[0]){ - globalStates = globalStates.playing; + globalState = globalStates.playing; timer = 0; } if(rectpoint({x:415, y:550, w: 300, h: 50}, {x:cursor.x, y:cursor.y}) && mouseDown[0]){ @@ -41,7 +41,6 @@ function handleCredits(){ if(timer > 20){ if(rectpoint({x:395, y:550, w: 140, h: 50}, {x:cursor.x, y:cursor.y}) && mouseDown[0]){ - titleScreenState = "main"; timer = 0; }