package eu.jonahbauer.wizard.client.libgdx;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import eu.jonahbauer.wizard.client.libgdx.screens.MainMenuScreen;

public class WizardGame extends Game {
	public static final int WIDTH = 1920;
	public static final int HEIGHT = 1080;

	public SpriteBatch batch;

	@Override
	public void create () {
		batch = new SpriteBatch();

		// background music
		Music backgroundMusic = Gdx.audio.newMusic(Gdx.files.internal("background.wav"));
		backgroundMusic.setLooping(true);
		backgroundMusic.setVolume(0.07f);
		backgroundMusic.play();

		// set cursor
		Pixmap cursor = new Pixmap(Gdx.files.internal("cursor.png"));
		Gdx.graphics.setCursor(Gdx.graphics.newCursor(cursor, 0, 0));
		cursor.dispose();
		
		this.setScreen(new MainMenuScreen(this));
	}
	
	@Override
	public void dispose () {
	}
}
