package de.eightbitboy.ecorealms;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

import de.eightbitboy.ecorealms.world.World;

public class EcoRealms extends ApplicationAdapter {
	private SpriteBatch batch;
	private Texture img;

	private EcoRealmsConfig config;
	private World world;


	public EcoRealms() {
		this.config = new EcoRealmsConfig();
	}

	public EcoRealms(EcoRealmsConfig config) {
		this.config = config;
	}

	@Override
	public void create() {
		batch = new SpriteBatch();
		img = new Texture("badlogic.jpg");

		world = new World(config.WORLD_SIZE_X, config.WORLD_SIZE_Y);
	}

	@Override
	public void render() {
		Gdx.gl.glClearColor(1, 0, 0, 1);
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
		batch.begin();
		batch.draw(img, 0, 0);
		batch.end();
	}

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

@@ -140,16 +140,68 @@
 s.GL20;%0A
+import com.badlogic.gdx.graphics.PerspectiveCamera;%0A
 import c
@@ -234,16 +234,16 @@
 exture;%0A
-
 import c
@@ -489,17 +489,48 @@
  world;%0A
+%09private PerspectiveCamera cam;
 %0A
-
 %0A%09public
@@ -692,24 +692,26 @@
 reate() %7B%0A%09%09
+//
 batch = new 
@@ -727,16 +727,18 @@
 ch();%0A%09%09
+//
 img = ne
@@ -768,69 +768,40 @@
 %22);%0A
-%0A
 %09%09
-world = new World(config.WORLD_SIZE_X, config.WORLD_SIZE_Y
+createWorld();%0A%09%09createCamera(
 );%0A%09
@@ -1033,16 +1033,16 @@
 pose();%0A
-
 %09%09img.di
@@ -1052,11 +1052,338 @@
 se();%0A%09%7D
+%0A%0A%09private void createWorld() %7B%0A%09%09world = new World(config.WORLD_SIZE_X, config.WORLD_SIZE_Y);%0A%09%7D%0A%0A%09private void createCamera() %7B%0A%09%09cam = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());%0A%09%09cam.position.set(10f, 10f, 10f);%0A%09%09cam.lookAt(0, 0, 0);%0A%09%09cam.near = 1f;%0A%09%09cam.far = 300f;%0A%09%09cam.update();%0A%09%7D
 %0A%7D%0A

Add camera