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

View File

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