package com.ld50.game;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

import Global.Global;
import u.Uinput;

public class HF extends Game {
	public SpriteBatch batch;
	BitmapFont font;
	public BitmapFont screenFont;

	public static final int MW = 1440;
	public static final int MH = 720;
	public static final int LW = 27;
	public static final int LH = 16;
	public static final int TW = 64;
	public static final int TH = 64;
	public static final int TTW = 10;
	public static final int TTH = 10;
	public static int Score = 0;
	public static Preferences GameSettings;
	public static float Speed = 100;
	public static int Health = 100;

	public void create() {
		batch = new SpriteBatch();
		font = new BitmapFont(Gdx.files.internal("hf.fnt"));
		font.setColor(Color.WHITE);
		// load settings (make sure you name it something unique to this game, because all LibGdxGames use the .prefs folder)
		GameSettings = Gdx.app.getPreferences("HF Preferences");
		Global.SetVolumeToZero = GameSettings.getBoolean("isSoundMuted");
		Global.IsMusicPaused = GameSettings.getBoolean("isMusicPaused");
		Uinput.LoadDefaultInputs();
		this.setScreen(new TitleScreen(this));// start using this!
		// this.setScreen(new GameScreen(this));// testing (switch to title once done)!
	}

	@Override
	public void render() {
		super.render();
	}

	@Override
	public void dispose() {
		batch.dispose();
		font.dispose();
	}
}
