fixed the transition

This commit is contained in:
William 2020-04-19 12:39:31 -04:00
parent 8832647318
commit ef9cda0689
2 changed files with 5 additions and 4 deletions

View File

@ -21,7 +21,7 @@ var globalStates = {
building: 5 building: 5
}; };
var globalState = globalStates.titleScreen; var globalState = globalStates.titleScreen;
debugger
function update() { function update() {
switch (globalState) { switch (globalState) {
@ -31,7 +31,7 @@ function update() {
break; break;
// level transition // level transition
case globalStates.levelTransition: case globalStates.levelTransition:
handleTransition();
break; break;
// playing // playing
case globalStates.playing: case globalStates.playing:
@ -68,7 +68,8 @@ function draw() {
break; break;
// level transition // level transition
case globalStates.levelTransition: case globalStates.levelTransition:
handleTransition();
drawLevelTransitionUI();
break; break;
// playing // playing
case globalStates.playing: case globalStates.playing:
@ -101,7 +102,6 @@ function absoluteDraw() {
break; break;
// level transition // level transition
case globalStates.levelTransition: case globalStates.levelTransition:
drawLevelTransitionUI();
break; break;
// playing // playing
case globalStates.playing: case globalStates.playing:

View File

@ -39,4 +39,5 @@ function drawLevelTransitionUI() {
// resets alpha for rest of drawing // resets alpha for rest of drawing
canvases.ctx.globalAlpha = 1; canvases.ctx.globalAlpha = 1;
} }