Package com.badlogic.gdx.utils

Examples of com.badlogic.gdx.utils.Json.fromJson()


     * @param fileHandle
     *         The JSON file.
     */
    public void load(FileHandle fileHandle) {
        Json json = new Json();
        ObjectMap<String, JsonValue> obj = json.fromJson(ObjectMap.class, fileHandle);
        if(obj != null) {
            for(ObjectMap.Entry<String, JsonValue> entry : obj.entries()) {
                if(entry.value == null) continue;
                EntityTemplate entityTemplate = new EntityTemplate(componentNamespace);
                entityTemplate.read(json, entry.value);
View Full Code Here


     * @param manifestFileHandle
     *         The manifest file handle.
     */
    public void loadManifest(FileHandle manifestFileHandle) {
        Json json = new Json();
        ObjectMap<String, JsonValue> assetGroups = json.fromJson(ObjectMap.class, manifestFileHandle);
        for(ObjectMap.Entry<String, JsonValue> entry : assetGroups.entries()) {
            AssetGroup assetGroup = new AssetGroup();
            assetGroup.read(json, entry.value);
            assetGroupMap.put(entry.key, assetGroup);
        }
View Full Code Here

  public void loadAsync (AssetManager manager, String fileName, FileHandle file, ParticleEffectLoadParameter parameter) {}

  @Override
  public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, ParticleEffectLoadParameter parameter) {
    Json json = new Json();
    ResourceData<ParticleEffect> data = json.fromJson(ResourceData.class, file);
    Array<AssetData> assets = null;
    synchronized (items) {
      ObjectMap.Entry<String, ResourceData<ParticleEffect>> entry = new ObjectMap.Entry<String, ResourceData<ParticleEffect>>();
      entry.key = fileName;
      entry.value = data;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.