Пример #1
0
 private static void createChainLights(TiledMap map, PooledEngine engine) {
   for (Layer layer : map.getLayers()) {
     if (layer.isObjectLayer()) {
       for (LayerObject obj : layer.getObjects()) {
         String entitytype = obj.getProperty("Entitytype", null);
         if (entitytype != null && entitytype.toLowerCase().equals("chainlight")) {
           createChainLight(
               engine,
               obj.getX(),
               obj.getY(),
               Color.valueOf(obj.getProperty("color", "FFFFFF")),
               obj.getFloatProperty("distance", 200),
               obj.getIntProperty("direction", 1),
               obj.getPoints());
         }
       }
     }
   }
 }
Пример #2
0
 private static void createMapEntities(
     TiledMap map, PooledEngine engine, PhysixSystem physixSystem) {
   for (Layer layer : map.getLayers()) {
     if (layer.isObjectLayer()) {
       // / pre filtering important objects,
       // / wich needs to be already existing when loading other
       // Objects
       for (LayerObject obj : layer.getObjects()) {
         String entitytype = obj.getProperty("Entitytype", null);
         if (entitytype != null) {
           entitytype = entitytype.toLowerCase();
           if (entitytype != null) {
             createMapEntity(entitytype, engine, physixSystem, obj, readTeam(obj));
           }
         }
       }
     }
   }
 }