• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ParticleEffectLoader类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader的典型用法代码示例。如果您正苦于以下问题:Java ParticleEffectLoader类的具体用法?Java ParticleEffectLoader怎么用?Java ParticleEffectLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ParticleEffectLoader类属于com.badlogic.gdx.graphics.g3d.particles包,在下文中一共展示了ParticleEffectLoader类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: FlameMain

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
public FlameMain () {
	super("Flame");
	MathUtils.random = new RandomXS128();
	particleSystem = ParticleSystem.get();
	effect = new ParticleEffect();
	particleSystem.add(effect);
	assetManager = new AssetManager();
	assetManager.setErrorListener(this);
	assetManager.setLoader(ParticleEffect.class, new ParticleEffectLoader(new InternalFileHandleResolver()));
	controllersData = new Array<ControllerData>();
	
	lwjglCanvas = new LwjglCanvas(renderer = new AppRenderer());
	addWindowListener(new WindowAdapter() {
		public void windowClosed (WindowEvent event) {
			//System.exit(0);
			Gdx.app.exit();
		}
	});

	initializeComponents();

	setSize(1280, 950);
	setLocationRelativeTo(null);
	setDefaultCloseOperation(DISPOSE_ON_CLOSE);
	setVisible(true);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:27,代码来源:FlameMain.java


示例2: openEffect

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
public ParticleEffect openEffect (File file, boolean replaceCurrentWorkspace) {
	try {
		ParticleEffect loadedEffect = load(file.getAbsolutePath(), ParticleEffect.class, null, 
			new ParticleEffectLoader.ParticleEffectLoadParameter(particleSystem.getBatches()));
		loadedEffect = loadedEffect.copy();
		loadedEffect.init();
		if(replaceCurrentWorkspace){
			effect = loadedEffect;
			controllersData.clear();
			particleSystem.removeAll();
			particleSystem.add(effect);
			for(ParticleController controller : effect.getControllers())
				controllersData.add(new ControllerData(controller));
			rebuildActiveControllers();
		}
		reloadRows();
		return loadedEffect;
	} catch (Exception ex) {
		System.out.println("Error loading effect: " + file.getAbsolutePath());
		ex.printStackTrace();
		JOptionPane.showMessageDialog(this, "Error opening effect.");
	}
	return null;
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:25,代码来源:FlameMain.java


示例3: processAssets

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
private void processAssets(Array<Asset> assets) {
    for (Asset asset : assets) {
        if (asset.isType(ParticleEffect.class)) {
            ParticleRenderingSystem particleRenderingSystem = entities.getEntitySystem(ParticleRenderingSystem.class);
            asset.parameters = new ParticleEffectLoader.ParticleEffectLoadParameter(particleRenderingSystem.getParticleSystem().getBatches());
        }
    }
}
 
开发者ID:MovementSpeed,项目名称:nhglib,代码行数:9,代码来源:SceneManager.java


示例4: initManager

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
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();
}
 
开发者ID:ToxSickCoder,项目名称:Skyland,代码行数:10,代码来源:ParticleUtils.java


示例5: GameScene

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
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);
}
 
开发者ID:jsjolund,项目名称:GdxDemo3D,代码行数:9,代码来源:GameScene.java


示例6: GameSceneManager

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
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;
}
 
开发者ID:jsjolund,项目名称:GdxDemo3D,代码行数:13,代码来源:GameSceneManager.java


示例7: BlenderAssetManager

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
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;
}
 
开发者ID:jsjolund,项目名称:GdxDemo3D,代码行数:14,代码来源:BlenderAssetManager.java


示例8: saveEffect

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
public void saveEffect (File file) {
	Writer fileWriter = null;
	try {
		ParticleEffectLoader loader = (ParticleEffectLoader)assetManager.getLoader(ParticleEffect.class);
		loader.save(effect, new ParticleEffectSaveParameter(new FileHandle(file.getAbsolutePath()), assetManager, particleSystem.getBatches()));
	} catch (Exception ex) {
		System.out.println("Error saving effect: " + file.getAbsolutePath());
		ex.printStackTrace();
		JOptionPane.showMessageDialog(this, "Error saving effect.");
	} finally {
		StreamUtils.closeQuietly(fileWriter);
	}
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:14,代码来源:FlameMain.java


示例9: loadParticleEffects

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
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();
}
 
开发者ID:jrenner,项目名称:gdx-proto,代码行数:9,代码来源:Assets.java


示例10: initParticles

import com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader; //导入依赖的package包/类
private void initParticles() {
	// particles
	particleSystem = ParticleSystem.get();
	particleSpriteBatch = new BillboardParticleBatch();

	particleSpriteBatch.setCamera(camera);
	particleSystem.add(particleSpriteBatch);

	assetManager = new AssetManager();
	ParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(particleSystem.getBatches());
	ParticleEffectLoader loader = new ParticleEffectLoader(new InternalFileHandleResolver());
	assetManager.setLoader(ParticleEffect.class, loader);
	assetManager.load("particles/3D/rocket_thruster.pfx", ParticleEffect.class, loadParam);
	assetManager.load("particles/3D/rocket_explosion.pfx", ParticleEffect.class, loadParam);
	assetManager.load("particles/3D/planet_portal.pfx", ParticleEffect.class, loadParam);
	assetManager.finishLoading();

	effectThrust = new ParticleEffect[3];
	effectThrust[0] = 		((ParticleEffect) assetManager.get("particles/3D/rocket_thruster.pfx")).copy();
	effectThrust[1] = 		((ParticleEffect) assetManager.get("particles/3D/rocket_thruster.pfx")).copy();
	effectThrust[2] = 		((ParticleEffect) assetManager.get("particles/3D/rocket_thruster.pfx")).copy();

	effectExplosion = 	((ParticleEffect) assetManager.get("particles/3D/rocket_explosion.pfx")).copy();
	effectPortal = 		((ParticleEffect) assetManager.get("particles/3D/planet_portal.pfx")).copy();
	effectExplosion.init();

	for (ParticleEffect e : effectThrust) {
		e.init();
		e.start();


		particleSystem.add(e);

	}

	effectPortal.init();
	effectPortal.start();
	effectPortal.translate(new Vector3(-30, 0, 135));
	effectPortal.rotate(Vector3.Z, 90);
	effectPortal.rotate(Vector3.X, 30);
	effectPortal.scale(2f, 2f, 2f);


	particleSystem.add(effectPortal);
}
 
开发者ID:aphex-,项目名称:Alien-Ark,代码行数:46,代码来源:PlanetScreen.java



注:本文中的com.badlogic.gdx.graphics.g3d.particles.ParticleEffectLoader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ExprFunction0类代码示例发布时间:2022-05-23
下一篇:
Java ViewHolder类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap