import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class MenuHandler here.
 * 
 * @author Florian
 * @version Verwaltet das Wechseln der Menüwelt und der Spielewelt
 */
public class MenuHandler extends UI
{
    private static Welt welt;
    private static Menu menu;

    public static void setWelt(){
        Welt.pause = false;
        try{
            Greenfoot.setWorld(welt);
        }catch(Exception e){
            welt = new Welt();
            Greenfoot.setWorld(welt);
        }
    }

    public static void setMenu(){
        Welt.pause = true;
        try{
            Greenfoot.setWorld(menu);
        }catch(Exception e){
            menu = new Menu();
            Greenfoot.setWorld(menu);
        }

    }

    public static void giveWelt(Welt w){
        welt = w;
    }

    public static void giveMenu(Menu m){
        menu = m;
    }

}
