package com.lubjam16.epiceggsmash.game;

import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Sound;

/**
 * Created by stonek on 1/30/16.
 */
public class Sounds {

    public static Sound explosion;
    public static Sound menuChange;
    public static Sound menuSelected;

    public static Music music;
    private static AssetManager manager;

    public static void init() {
        manager = new AssetManager();

        manager.load("explosion.wav", Sound.class);
        manager.load("music.mp3",Music.class);
        manager.load("menuSound.wav", Sound.class);
        manager.load("menuSelected.wav", Sound.class);

        manager.finishLoading();

        music = manager.get("music.mp3");
        explosion = manager.get("explosion.wav");
        menuChange = manager.get("menuSound.wav");
        menuSelected = manager.get("menuSelected.wav");

        music.setVolume(0.5f);
        music.setLooping(true);
        music.play();
    }

    public static void clear() {
        music.stop();
        manager.dispose();
        explosion.dispose();
    }
}
