package com.lubjam16.epiceggsmash.game;

import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Texture;

/**
 * Created by stonek on 1/30/16.
 */
public class Graphics {
    public static Texture buttonQActive;
    public static Texture buttonQInactive;
    public static Texture buttonQWrong;
    public static Texture buttonWActive;
    public static Texture buttonWInactive;
    public static Texture buttonWWrong;
    public static Texture buttonOActive;
    public static Texture buttonOInactive;
    public static Texture buttonOWrong;
    public static Texture buttonPActive;
    public static Texture buttonPInactive;
    public static Texture buttonPWrong;
    public static Texture bigRightEgg;
    public static Texture smallRightEgg;
    public static Texture smallRightEggBroken;
    public static Texture[] rightEggShells = new Texture[10];
    public static Texture bigLeftEgg;
    public static Texture smallLeftEgg;
    public static Texture smallLeftEggBroken;
    public static Texture[] leftEggShells = new Texture[10];
    public static Texture bg1;
    public static Texture title;

    public static void init(){

        AssetManager manager = new AssetManager();
        manager.load("literaQGreen.png",Texture.class);
        manager.load("literaQGrey.png",Texture.class);
        manager.load("literaQRed.png",Texture.class);
        manager.load("literaWGreen.png",Texture.class);
        manager.load("literaWGrey.png",Texture.class);
        manager.load("literaWRed.png",Texture.class);
        manager.load("literaPGreen.png",Texture.class);
        manager.load("literaPGrey.png",Texture.class);
        manager.load("literaPRed.png",Texture.class);
        manager.load("literaOGreen.png",Texture.class);
        manager.load("literaOGrey.png",Texture.class);
        manager.load("literaORed.png",Texture.class);
        manager.load("jaja/jajo1v.png",Texture.class);
        manager.load("jaja/jajo1vbroken.png",Texture.class);
        manager.load("jaja/jajo1.png",Texture.class);
        manager.load("jaja/jajo2v.png",Texture.class);
        manager.load("jaja/jajo2vbroken.png",Texture.class);
        manager.load("jaja/jajo2.png", Texture.class);
        manager.load("tloFinal.jpg",Texture.class);
        manager.load("title.png",Texture.class);

        for(int i = 0; i < 10; i++){
            manager.load("jaja/jajo1_"+(i+1)+".png",Texture.class);
            manager.load("jaja/jajo2_"+(i+1)+".png",Texture.class);
        }

        manager.finishLoading();

        buttonQActive = manager.get("literaQGreen.png",Texture.class);
        buttonQActive.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonQInactive = manager.get("literaQGrey.png",Texture.class);
        buttonQInactive.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonQWrong = manager.get("literaQRed.png",Texture.class);
        buttonQWrong.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonWActive = manager.get("literaWGreen.png",Texture.class);
        buttonWActive.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonWInactive = manager.get("literaWGrey.png", Texture.class);
        buttonWInactive.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonWWrong = manager.get("literaWRed.png",Texture.class);
        buttonWWrong.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonOActive = manager.get("literaOGreen.png",Texture.class);
        buttonOActive.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonOInactive = manager.get("literaOGrey.png",Texture.class);
        buttonOInactive.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonOWrong = manager.get("literaORed.png",Texture.class);
        buttonOWrong.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonPActive = manager.get("literaPGreen.png",Texture.class);
        buttonPActive.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonPInactive = manager.get("literaPGrey.png", Texture.class);
        buttonPInactive.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        buttonPWrong = manager.get("literaPRed.png", Texture.class);
        buttonPWrong.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        smallRightEgg = manager.get("jaja/jajo1v.png",Texture.class);
        smallRightEgg.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        smallLeftEgg = manager.get("jaja/jajo2v.png",Texture.class);
        smallLeftEgg.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);

        smallRightEggBroken = manager.get("jaja/jajo1vbroken.png",Texture.class);
        smallRightEggBroken.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        smallLeftEggBroken = manager.get("jaja/jajo2vbroken.png",Texture.class);
        smallLeftEggBroken.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        bigRightEgg = manager.get("jaja/jajo1.png",Texture.class);
        bigRightEgg.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        bigLeftEgg = manager.get("jaja/jajo2.png",Texture.class);
        bigLeftEgg.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);

        for(int i = 0; i < 10; i++){
            rightEggShells[i] = manager.get("jaja/jajo1_" + (i + 1) + ".png", Texture.class);
            rightEggShells[i].setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
            leftEggShells[i] = manager.get("jaja/jajo2_" + (i + 1) + ".png", Texture.class);
            leftEggShells[i].setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
        }

        bg1 = manager.get("tloFinal.jpg",Texture.class);
        bg1.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);

        title = manager.get("title.png", Texture.class);
        title.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);
    }
}
