public void update(double dt, int x, int y, Input ip, Vector2 camPos) throws SlickException
	{

		level.Update(camPos);
		if (inEditor)
		{
			if (level.UpdateEditor(new Vector2(x + camPos.X, y + camPos.Y), ip))
				lightManager.init(level.getAllRooms());
		}

		player.HandleInput(ip, dt);
		player.Update();

//		ennemy.HandleMoves(dt, waypoints.getClosestWaypoint(player.getPos()), waypoints.getClosestWaypoints(ennemy.getPos()));
//		ennemy.Update(player.getCollision(), player.getVisibility());

		if (ip.isKeyPressed(Input.KEY_I))
			lightEnabled = !lightEnabled;
		else if (ip.isKeyPressed(Input.KEY_F12) && inEditor)
		{
			level.Init();
			this.collision = level.Load("level.cfg");
		}

		if (lightEnabled)
			lightManager.update(dt, level.getCurrentRoom(player.getPos()));
	}