package com.ezardlabs.lostsector;

import com.ezardlabs.dethsquare.Animator;
import com.ezardlabs.dethsquare.Collider;
import com.ezardlabs.dethsquare.GameObject;
import com.ezardlabs.dethsquare.LevelManager;
import com.ezardlabs.dethsquare.Renderer;
import com.ezardlabs.dethsquare.Rigidbody;
import com.ezardlabs.dethsquare.TextureAtlas;
import com.ezardlabs.dethsquare.multiplayer.NetworkAnimator;
import com.ezardlabs.dethsquare.multiplayer.NetworkRenderer;
import com.ezardlabs.dethsquare.multiplayer.NetworkTransform;
import com.ezardlabs.dethsquare.prefabs.PrefabManager;
import com.ezardlabs.dethsquare.util.BaseGame;
import com.ezardlabs.lostsector.levels.ExploreLevel;
import com.ezardlabs.lostsector.levels.MainMenuLevel;
import com.ezardlabs.lostsector.levels.MultiplayerLevel;
import com.ezardlabs.lostsector.levels.MultiplayerLobbyLevel;
import com.ezardlabs.lostsector.levels.ProceduralLevel;
import com.ezardlabs.lostsector.levels.SurvivalLevel;
import com.ezardlabs.lostsector.objects.Player;
import com.ezardlabs.lostsector.objects.environment.Door;
import com.ezardlabs.lostsector.objects.environment.LaserDoor;
import com.ezardlabs.lostsector.objects.hud.HUD;
import com.ezardlabs.lostsector.objects.warframes.Frost;

public class Game extends BaseGame {
	public static GameObject[] players;

	public enum DamageType {
		NORMAL,
		SLASH,
		COLD,
		KUBROW
	}

	@Override
	public void create() {
		LevelManager.registerLevel("explore", new ExploreLevel());
		LevelManager.registerLevel("survival", new SurvivalLevel());
		LevelManager.registerLevel("procedural", new ProceduralLevel());
		LevelManager.registerLevel("multiplayer_lobby", new MultiplayerLobbyLevel());
		LevelManager.registerLevel("multiplayer", new MultiplayerLevel());
		LevelManager.registerLevel("main_menu", new MainMenuLevel());

		registerPlayerPrefabs();
		registerDoorPrefabs();

		LevelManager.loadLevel("multiplayer_lobby");
	}

	private void registerPlayerPrefabs() {
		PrefabManager.addPrefab("player",
				() -> new GameObject("Player", "player", new Player(),
						new HUD(), new Renderer(), new Animator(), new Frost(),
						new Collider(200, 200), new Rigidbody(), new NetworkTransform(),
						new NetworkRenderer(), new NetworkAnimator()),
				() -> new GameObject("Other Player", "player", new Renderer(),
						new Animator(), new Frost(), new Collider(200, 200), new NetworkTransform(),
						new NetworkRenderer(), new NetworkAnimator()));
	}

	private void registerDoorPrefabs() {
		PrefabManager.addPrefab("door", () -> new GameObject("Door", new Door(
				new TextureAtlas("images/environment/atlas.png", "images/environment/atlas.txt")),
				new Renderer(), new Animator(), new Collider(100, 500, true),
				new NetworkAnimator()), () -> new GameObject("Door", new Door(
				new TextureAtlas("images/environment/atlas.png", "images/environment/atlas.txt")),
				new Renderer(), new Animator(), new NetworkAnimator()));
		PrefabManager.addPrefab("laser_door", () -> new GameObject("Laser Door", new LaserDoor(
				new TextureAtlas("images/environment/atlas.png", "images/environment/atlas.txt")),
				new Renderer(), new Animator(), new Collider(100, 500, true),
				new NetworkAnimator()), () -> new GameObject("Laser Door", new LaserDoor(
				new TextureAtlas("images/environment/atlas.png", "images/environment/atlas.txt")),
				new Renderer(), new Animator(), new NetworkAnimator()));
	}
}
@@ -1173,16 +1173,79 @@
 ud.HUD;%0A
+import com.ezardlabs.lostsector.objects.projectiles.LankaBeam;%0A
 import c
@@ -1293,16 +1293,16 @@
 .Frost;%0A
-
 %0Apublic 
@@ -1902,16 +1902,47 @@
 fabs();%0A
+%09%09registerProjectilePrefabs();%0A
 %09%09regist
@@ -2473,32 +2473,32 @@
 orkTransform(),%0A
-
 %09%09%09%09%09%09new Networ
@@ -2535,24 +2535,397 @@
 or()));%0A%09%7D%0A%0A
+%09private void registerProjectilePrefabs() %7B%0A%09%09PrefabManager.addPrefab(%22lanka_beam%22,%0A%09%09%09%09() -%3E new GameObject(%22Lanka Beam%22, new Renderer(%22images/blue.png%22, 0, 0),%0A%09%09%09%09%09%09new LankaBeam(500), new NetworkTransform(), new NetworkRenderer()),%0A%09%09%09%09() -%3E new GameObject(%22Lanka Beam%22, new Renderer(%22images/blue.png%22, 0, 0),%0A%09%09%09%09%09%09new NetworkTransform(), new NetworkRenderer()));%0A%09%7D%0A%0A
 %09private voi

Add Lanka beam prefab