public Ui(){
        bg = new GreenfootImage (1000, 230);
        cache = new GreenfootImage [6];
        cache[0] = new GreenfootImage ("UI/general.png");
        cache[1] = new GreenfootImage ("UI/buildTower.png");
        cache[2] = new GreenfootImage ("UI/sendMobs.png");
        cache[3] = new GreenfootImage ("UI/selectTower.png");
        cache[4] = new GreenfootImage ("UI/selectTower.png");
        cache[5] = new GreenfootImage ("UI/selectMob.png");

        elements = new GreenfootImage [4];
        elements[0] = new GreenfootImage ("UI/fire2.png");
        elements[1] = new GreenfootImage ("UI/water2.png");
        elements[2] = new GreenfootImage ("UI/air2.png");
        elements[3] = new GreenfootImage ("UI/earth2.png");

        generalFont = new Font ("Times New Roman", 1, 20);
        name        = new Font ("Vrinda"         , 1, 35);
        descFont    = new Font ("Vrinda"         , 0, 20);
        statFont    = new Font ("Vrinda"         , 1, 25);

        lifeColor   = new Color (225, 0  , 0);
        goldColor   = new Color (225, 175, 55);
        nameColor   = new Color (20 , 210, 245);
        descColor   = new Color (255, 255, 255);
        statColor   = new Color (45 , 200, 45 );
        debuffColor = new Color (255, 50, 0);

        sellButton    = new SellButton();
        upgradeButton = new UpgradeButton();
        buttons = new Button[2][12];
        for (int i = 0; i < 12; i++){
            buttons[0][i] = new SendCreeps(i+1);
        }
        for (int i = 0; i < 12; i++){
            buttons[1][i] = new BuildTowers(i+1);
        }
        debuffs = new DebuffButton [5];
        for (int i = 0; i < 5; i++){
            debuffs[i] = new DebuffButton(i);
        }
        dumbDebuff = new DummyDebuff[5];
        for (int i = 0; i < 5; i++){
            dumbDebuff[i] = new DummyDebuff(i);
        }
        reload = new Reload();
        waveElement = new Element[3];
        waveElement[0] = new Element();     //current wave
        waveElement[1] = new Element();     //next wave
        waveElement[2] = new Element();     //mob element

        id = 0;
        lives   = 20;
        gold    = 100;
        level   = 1;
        wave    = "Air";
        next    = "Water";

        refresh();
    }