package com.ezardlabs.lostsector.levels;

import com.ezardlabs.dethsquare.AudioManager.AudioGroup;
import com.ezardlabs.dethsquare.AudioSource;
import com.ezardlabs.dethsquare.AudioSource.AudioClip;
import com.ezardlabs.dethsquare.Camera;
import com.ezardlabs.dethsquare.GameObject;
import com.ezardlabs.dethsquare.GuiText;
import com.ezardlabs.dethsquare.Level;
import com.ezardlabs.dethsquare.Screen;
import com.ezardlabs.dethsquare.TextureAtlas;
import com.ezardlabs.dethsquare.Vector2;
import com.ezardlabs.dethsquare.multiplayer.Network;
import com.ezardlabs.lostsector.Game;
import com.ezardlabs.lostsector.map.MapManager;
import com.ezardlabs.lostsector.objects.CameraMovement;

public class ExploreLevel extends Level {
	private static CameraMovement cm = new CameraMovement();

	@Override
	public void onLoad() {
		MapManager.playerSpawn = new Vector2(20.0f, 20.0f);
		MapManager.loadMap("Explore");

		Game.players = new GameObject[]{Network.instantiate("player",
				new Vector2(MapManager.playerSpawn))};

		GameObject.instantiate(new GameObject("Camera", new Camera(true), cm,
						new AudioSource(new AudioClip("audio/theme.ogg"), true, AudioGroup.MUSIC)),
				new Vector2(MapManager.playerSpawn));

		cm.smoothFollow(Game.players[0].transform);

		TextureAtlas fontTA = TextureAtlas.load("fonts/atlas.png", "fonts/atlas.txt");
		GameObject.instantiate(new GameObject("MainMenuWIP",
						new GuiText("DEV BUILD : WORK IN PROGRESS!", fontTA, 30)),
				new Vector2(10, Screen.height - 30 - 10));
	}
}

@@ -610,22 +610,26 @@
 tor.
-map.MapManag
+camera.SmartCam
 er
+a
 ;%0Aim
@@ -662,30 +662,22 @@
 tor.
-objects.CameraMovement
+map.MapManager
 ;%0A%0Ap
@@ -720,66 +720,8 @@
 el %7B
-%0A%09private static CameraMovement cm = new CameraMovement();
 %0A%0A%09@
@@ -1020,11 +1020,86 @@
 ue),
- cm
+%0A%09%09%09%09%09%09new SmartCamera(Game.players%5B0%5D.transform, 1000, new Vector2(100, 100))
 ,%0A%09%09
@@ -1225,55 +1225,8 @@
 );%0A%0A
-%09%09cm.smoothFollow(Game.players%5B0%5D.transform);%0A%0A
 %09%09Te

Switch camera over to smart camera