src/Game.java
/**
     * Update that is called each frame
     */
Update that is called each frame
Update that is called each frame
private void update(){
        if(Game.gameState.equals("menu")){
            menu.update();
        }else if(Game.gameState.equals("loading screen")){
            loadScreen.update();
        }else if(Game.gameState.equals("level select")){
            lvlSelect.update();
        }else if(Game.gameState.equals("game")){
            handler.update();
            cam.update(player);
        }else if(Game.gameState.equals("highscores")){
            highscore.update();
        }else if(Game.gameState.equals("endscreen")){
            endscreen.update();
        }else if(Game.gameState.equals("quiz")){
            quiz.update();
        }
        if(fade){
            fadeAlpha-=3;
        }
        if(fadeAlpha <= 0){
            fadeAlpha = 0;
            fade = false;            
        }
    }
private void update ( ) { if ( Game . gameState . equals ( "menu" ) ) { menu . update ( ) ; } else if ( Game . gameState . equals ( "loading screen" ) ) { loadScreen . update ( ) ; } else if ( Game . gameState . equals ( "level select" ) ) { lvlSelect . update ( ) ; } else if ( Game . gameState . equals ( "game" ) ) { handler . update ( ) ; cam . update ( player ) ; } else if ( Game . gameState . equals ( "highscores" ) ) { highscore . update ( ) ; } else if ( Game . gameState . equals ( "endscreen" ) ) { endscreen . update ( ) ; } else if ( Game . gameState . equals ( "quiz" ) ) { quiz . update ( ) ; } if ( fade ) { fadeAlpha -= 3 ; } if ( fadeAlpha <= 0 ) { fadeAlpha = 0 ; fade = false ; } }
Update that is called each frame
Update that is called each frame
// Compute Fade
