}
@Override
public void onAdd() {
addLayer(new BackgroundLayer(level.getChunks()));
DynamicLayer d = addLayer(new DynamicLayer());
addLayer(new ForegroundLayer(level.getChunks()));
addLayer(new BlocksLayer(level.getBlocks())).setVisible(false);
for (Actor a : actors) {
if (a.getName().equals("player")) {
d.addActor(new PlayerActor(new Vector(Double.valueOf(a.getArgs()[0]), Double.valueOf(a.getArgs()[1]))));
} else if (a.getName().equals("soldier")) {
d.addActor(new SoldierActor(new Vector(Double.valueOf(a.getArgs()[0]), Double.valueOf(a.getArgs()[1]))));
} else if (a.getName().equals("sign")) {
d.addActor(new SignActor(a.getArgs()[4], new Rectangle(Double.valueOf(a.getArgs()[0]), Double.valueOf(a
.getArgs()[1]), Double.valueOf(a.getArgs()[2]), Double.valueOf(a.getArgs()[3]))));
} else if (a.getName().equals("metal")) {
d.addActor(new MetalActor(new Rectangle(Double.valueOf(a.getArgs()[0]), Double.valueOf(a.getArgs()[1]),
Double.valueOf(a.getArgs()[2]), Double.valueOf(a.getArgs()[3]))));
} else {
System.out.println("Unknown Actor in level file: " + a.getName());
}
}