package com.jan.game;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;

public class Main extends ApplicationAdapter {
	private OrthographicCamera camera;
	
	@Override
	public void create () {
		SceneManager.initialize();
		
        camera = new OrthographicCamera(30,20);
		Display.setResolution(1920, 1080);
		Display.setResolution(680, 420);
		Display.useCamera(camera);
		camera.translate(15, 10);
		SceneManager.loadScene("maps/testLevel1.tmx");
	}

	@Override
	public void render () {
		Gdx.gl.glClearColor(0, 0, 0, 1);
        Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
		
		SceneManager.updateScene();;
		Display.update();
	}
	
	@Override
	public void dispose () {
		
	}
}

