Java源码示例:com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader
示例1
public GameScene(ModelLoader.ModelParameters modelParameters,
TextureLoader.TextureParameter textureParameter,
ParticleEffectLoader.ParticleEffectLoadParameter pfxParameter,
String pfxPath, String modelPath, String modelExt, ObjectMap<String, GameObjectBlueprint> sharedBlueprints) {
this.sharedBlueprints = sharedBlueprints;
this.assets = new BlenderAssetManager(modelParameters, textureParameter, pfxParameter,
pfxPath, modelPath, modelExt);
}
示例2
public GameSceneManager(ModelLoader.ModelParameters modelParameters,
TextureLoader.TextureParameter textureParameter,
ParticleEffectLoader.ParticleEffectLoadParameter pfxParameter,
String pfxPath, String modelPath, String modelExt) {
this.modelPath = modelPath;
this.modelExt = modelExt;
this.pfxPath = pfxPath;
this.modelParameters = modelParameters;
this.textureParameter = textureParameter;
this.pfxParameter = pfxParameter;
}
示例3
public BlenderAssetManager(
ModelLoader.ModelParameters modelParameters,
TextureLoader.TextureParameter textureParameter,
ParticleEffectLoader.ParticleEffectLoadParameter pfxParameter,
String pfxPath, String modelPath, String modelExt) {
this.modelExt = modelExt;
this.modelPath = modelPath;
this.pfxPath = pfxPath;
this.modelParameters = modelParameters;
this.textureParameter = textureParameter;
this.pfxParameter = pfxParameter;
}
示例4
private void initManager() {
particleManager = new AssetManager();
ParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(particleSystem.getBatches());
ParticleEffectLoader loader = new ParticleEffectLoader(new InternalFileHandleResolver());
particleManager.setLoader(ParticleEffect.class, loader);
particleManager.load(Particles.PARTICLE_CLOUD_PUFF, ParticleEffect.class, loadParam);
particleManager.load(Particles.PARTICLE_CAVE_DUST, ParticleEffect.class, loadParam);
particleManager.finishLoading();
}
示例5
public static void loadParticleEffects(ParticleSystem particleSystem) {
ParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(particleSystem.getBatches());
ParticleEffectLoader loader = new ParticleEffectLoader(new InternalFileHandleResolver());
manager.setLoader(ParticleEffect.class, loader);
manager.load("particle/bullet-hit.pfx", ParticleEffect.class, loadParam);
manager.load("particle/blue-explosion.pfx", ParticleEffect.class, loadParam);
manager.finishLoading();
}