renderer.addKeyListener(ctrlInput);
if(levelEditor == true){
renderer.addMouseListener(editorDisplay.getMouseListener());
renderer.addMouseMotionListener(editorDisplay.getMouseMotionListener());
}
ShapeHandler sh = new ShapeHandler();
sh.loadShapes(new File("config\\shapes.xml"));
player1 = new PlayerHandler(input1, sh.getShapeByName("classic"));
player1.enterCreate(world, new Vector2d(0, 0));
player1.enterInit(world);
player1.enterPlayActive(world);
hud1.setPlayerShip(player1);
pb1.setPlayerShip(player1);
player2 = new PlayerHandler(input2, sh.getShapeByName("modified"));
player2.enterCreate(world, new Vector2d(0, -400));
player2.enterInit(world);
player2.enterPlayActive(world);
hud2.setPlayerShip(player2);
pb2.setPlayerShip(player2);
//planet = new Planet(60, AbstractWorldObject.TTL_INFINITE, TypeE.OBJECT_ALIVE);
testPlanetEnvironment = new TestPlanetEnvironment(new Vector2d(300, 0)); // TODO : Test
//planet.setPosition(new Vector2d(300, 0));
//world.addObject(planet, false);
// MAP/LEVEL
if(levelEditor == false){
ShapeHandler levelLoader = new ShapeHandler();
levelLoader.loadShapes(new File("config\\level.xml"));
List<ShapeData> groundShapes = levelLoader.getShapes();
for (ShapeData sd : Collections.unmodifiableCollection(groundShapes)){
// System.out.println("SHAPE : len = " + sd.x.length);
Polygon pShape = new Polygon();
for(int vx=0;vx<sd.x.length;vx++){
pShape.addPoint(sd.x[vx]-500, sd.y[vx]-500); // TODO: FIX SIZE TO MAP!!!