Package com.badlogic.gdx.assets

Examples of com.badlogic.gdx.assets.AssetDescriptor


      if (parameter != null) {
        texParams.minFilter = parameter.textureMinFilter;
        texParams.magFilter = parameter.textureMagFilter;
      }
      for (FileHandle image : loadTilesets(root, tmxFile)) {
        dependencies.add(new AssetDescriptor(image, Texture.class, texParams));
      }
      return dependencies;
    } catch (IOException e) {
      throw new GdxRuntimeException("Couldn't load tilemap '" + fileName + "'", e);
    }
View Full Code Here


        FileHandle directory = resolve(fileName);
        files.clear();
        for(FileHandle file : directory.list()) {
            if(file.isDirectory() || !acceptedFiles.contains(file.extension(), false)) continue;
            files.add(file);
            deps.add(new AssetDescriptor(file.path(), Pixmap.class));
        }
        return deps;
    }
View Full Code Here

      data = parameter.bitmapFontData;
      return deps;
    }
    data = new BitmapFontData(file, parameter != null ? parameter.flip : false);
    for (int i=0; i<data.getImagePaths().length; i++) {
      deps.add(new AssetDescriptor(data.getImagePath(i), Texture.class));
    }
    return deps;
  }
View Full Code Here

  @Override
  public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, SkinParameter parameter) {
    Array<AssetDescriptor> deps = new Array();
    if (parameter == null)
      deps.add(new AssetDescriptor(file.pathWithoutExtension() + ".atlas", TextureAtlas.class));
    else if (parameter.textureAtlasPath != null)
      deps.add(new AssetDescriptor(parameter.textureAtlasPath, TextureAtlas.class));
    return deps;
  }
View Full Code Here

      if (parameter != null) {
        texParams.minFilter = parameter.textureMinFilter;
        texParams.magFilter = parameter.textureMagFilter;
      }
      for (FileHandle image : loadTilesets(root, tmxFile)) {
        dependencies.add(new AssetDescriptor(image, Texture.class, texParams));
      }
      return dependencies;
    } catch (IOException e) {
      throw new GdxRuntimeException("Couldn't load tilemap '" + fileName + "'", e);
    }
View Full Code Here

        for (Element property : properties.getChildrenByName("property")) {
          String name = property.getAttribute("name");
          String value = property.getAttribute("value");
          if (name.startsWith("atlas")) {
            FileHandle atlasHandle = getRelativeFileHandle(tmxFile, value);
            dependencies.add(new AssetDescriptor(atlasHandle, TextureAtlas.class));
          }
        }
      }
    } catch (IOException e) {
      throw new GdxRuntimeException("Unable to parse .tmx file.");
View Full Code Here

      if (parameter != null) {
        texParams.minFilter = parameter.textureMinFilter;
        texParams.magFilter = parameter.textureMagFilter;
      }
      for (FileHandle image : loadTilesets(root, tmxFile)) {
        dependencies.add(new AssetDescriptor(image, Texture.class, texParams));
      }
      return dependencies;
    } catch (IOException e) {
      throw new GdxRuntimeException("Couldn't load tilemap '" + fileName + "'", e);
    }
View Full Code Here

        for (Element property : properties.getChildrenByName("property")) {
          String name = property.getAttribute("name");
          String value = property.getAttribute("value");
          if (name.startsWith("atlas")) {
            FileHandle atlasHandle = getRelativeFileHandle(tmxFile, value);
            dependencies.add(new AssetDescriptor(atlasHandle, TextureAtlas.class));
          }
        }
      }
    } catch (IOException e) {
      throw new GdxRuntimeException("Unable to parse .tmx file.");
View Full Code Here

        for (Element property : properties.getChildrenByName("property")) {
          String name = property.getAttribute("name");
          String value = property.getAttribute("value");
          if (name.startsWith("atlas")) {
            FileHandle atlasHandle = getRelativeFileHandle(tmxFile, value);
            dependencies.add(new AssetDescriptor(atlasHandle, TextureAtlas.class));
          }
        }
      }
    } catch (IOException e) {
      throw new GdxRuntimeException("Unable to parse .tmx file.");
View Full Code Here

      if (parameter != null) {
        texParams.minFilter = parameter.textureMinFilter;
        texParams.magFilter = parameter.textureMagFilter;
      }
      for (FileHandle image : loadTilesets(root, tmxFile)) {
        dependencies.add(new AssetDescriptor(image, Texture.class, texParams));
      }
      return dependencies;
    } catch (IOException e) {
      throw new GdxRuntimeException("Couldn't load tilemap '" + fileName + "'", e);
    }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.assets.AssetDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.