myApp.getBulletAppState().getPhysicsSpace().addAll(island);
island.getChild("SpawningPoints").setCullHint(Spatial.CullHint.Always);
//Spawning enemies
Node level2enemie = (Node) ((Node) ((Node) island.getChild("SpawningPoints")).getChild("2")).getChild("Enemy");
Node level3enemie = (Node) ((Node) ((Node) island.getChild("SpawningPoints")).getChild("3")).getChild("Enemy");
Node level4enemie = (Node) ((Node) ((Node) island.getChild("SpawningPoints")).getChild("4")).getChild("Enemy");
//Blobs
for (Spatial point : level2enemie.getChildren()) {
addEnemy((Enemy) Entity.ENEMY_BLOB.createEntity(), 2f, point.getWorldTranslation().add(0f, -15.4556f, 0f));
}
//Armadilos
for (Spatial point : level3enemie.getChildren()) {
addEnemy((Enemy) Entity.ENEMY_ARMADILO.createEntity(), 4f, point.getWorldTranslation().add(0f, -15.4556f, 0f));
}
//Elephants
for (Spatial point : level4enemie.getChildren()) {
addEnemy((Enemy) Entity.ENEMY_ELEPHANT.createEntity(), 6f, point.getWorldTranslation().add(0f, -15.4556f, 0f));
}
cc = new GameStartCinematic(myApp);
cc.attach();