/**
 * Anima: A singular journey
 * CS470 Capstone Project
 * Shawn Aldridge
 */

package anima;

import javax.swing.*;
import java.awt.*;

/**
 *
 * @author Shawn Aldridge
 */
public class GameManager {

    static Level1 game;
    static Level2 game2;
    static Level4 finalGame;
    static CutScene1 cut;

    public static void main(String[] args)
    {

        UIManager.put("nimbusBase", Color.blue);
        try{
        UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
        }catch(Exception e){System.err.println("Exception loading look and feel");}

        LevelManager manager = new LevelManager();
        manager.canvas.addGLEventListener(manager);
       
        while(manager.level1 != true)
        {
            
        }

        game = new Level1();
        game.canvas.addGLEventListener(game);

        while(game.out == false)
        {
            
        }

        game.dispose();
        game.background.stop();
         
        manager.level2 = true;
        
        while(manager.level2 != true)
        {

        }
        
        game2 = new Level2();
        //game.canvas.addGLEventListener(game);
        game2.canvas.addGLEventListener(game2);
        //manager.level1 = true;
        //level2 = true;

        while(game2.out == false)
        {

        }

        game2.dispose();
        game2.background.stop();
         

        manager.cut = true;
        
        while(manager.cut != true)
        {

        }

        cut = new CutScene1();
        cut.canvas.addGLEventListener(cut);

        while(cut.done == false)
        {
            
        }

        cut.dispose();

        finalGame = new Level4();
        finalGame.createMaze();
        finalGame.canvas.addGLEventListener(finalGame);

        
    }

}
