Java 类com.badlogic.gdx.assets.loaders.ParticleEffectLoader.ParticleEffectParameter 实例源码

项目:gdx-lml    文件:ParticleEffectProvider.java   
@Override
public ParticleEffect getOrLoad(final String id) {
    final String[] data = Strings.split(id, '$');
    if (data.length == 0) {
        throwUnknownPathException();
    }
    final String path = determinePath(data[0]);
    getIdsToPaths().put(id, path);
    final AssetManager assetManager = getAssetManager();
    if (assetManager.isLoaded(path)) {
        return assetManager.get(path, getType());
    }
    if (data.length > 1) {
        final String atlasName = TextureAtlasProvider.getTextureAtlasPath(data[1]);
        final ParticleEffectParameter parameters = new ParticleEffectParameter();
        parameters.atlasFile = atlasName;
        assetManager.load(path, ParticleEffect.class, parameters);
    } else {
        assetManager.load(path, ParticleEffect.class);
    }
    return null;
}
项目:c2d-engine    文件:RuleParticleEffect.java   
@Override
public boolean match(FileHandle file) {
    boolean result = file.extension().equals("p");
    if(result) {
        Engine.getAssetManager().load(file.path().replace("\\", "/"),ParticleEffect.class);
        return result;
    }
    result = file.extension().equals("pp");
    if(result) {
        ParticleEffectParameter parameter = new ParticleEffectParameter();
        parameter.atlasFile = file.pathWithoutExtension().replace("\\", "/")+".atlas";
        Engine.getAssetManager().load(file.path().replace("\\", "/"),ParticleEffect.class,parameter);
        return result;
    }
    return  false;
}
项目:KyperBox    文件:KyperBoxGame.java   
public void loadParticleEffect(String name, String atlas) {
    ParticleEffectParameter param = new ParticleEffectParameter();
    param.atlasFile = atlas;
    assets.load(PARTICLE_FOLDER + FILE_SEPARATOR + name, ParticleEffect.class, param);
}