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

Java ParticleSystem类代码示例

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

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



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

示例1: dispose

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的package包/类
public void dispose() {
	ParticleSystem particleSystem = ParticleSystem.get();
	for (ParticleEffect pfx : particleEffects) {
		particleSystem.remove(pfx);
		pfx.dispose();
	}
	particleEffects.clear();
	navMesh.dispose();
	for (Array<GameObject> objs : gameObjects.values()) {
		for (GameObject obj : objs) {
			obj.dispose();
		}
	}
	gameObjects.clear();
	assets.dispose();
}
 
开发者ID:jsjolund,项目名称:GdxDemo3D,代码行数:17,代码来源:GameScene.java


示例2: FlameMain

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的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


示例3: newObject

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的package包/类
@Override
protected ParticleEffect newObject() {
	ParticleEffect newEffect = sourceEffect.copy();
	newEffect.init();
	ParticleSystem.get().add(newEffect);
    return newEffect;
}
 
开发者ID:Osaris31,项目名称:exterminate,代码行数:8,代码来源:Assets.java


示例4: loadParticleEffects

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的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


示例5: Particles

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的package包/类
public Particles() {
	inst = this;
	system = ParticleSystem.get();
	PointSpriteParticleBatch psBatch = new PointSpriteParticleBatch();
	psBatch.setCamera(View.inst.getCamera());
	system.add(psBatch);

	Assets.loadParticleEffects(system);

	ParticleEffect bulletHit = Assets.manager.get("particle/bullet-hit.pfx");
	ParticleEffect blueExplosion = Assets.manager.get("particle/blue-explosion.pfx");
	bulletHitPool = new PFXPool(bulletHit);
	blueExplosionPool = new PFXPool(blueExplosion);
}
 
开发者ID:jrenner,项目名称:gdx-proto,代码行数:15,代码来源:Particles.java


示例6: ParticleRenderingSystem

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的package包/类
public ParticleRenderingSystem(Entities entities) {
    super(Aspect.all(NodeComponent.class, ParticleEffectComponent.class), entities);
    particleSystem = new ParticleSystem();
    particleEffectProvider = new ParticleEffectProvider();
}
 
开发者ID:MovementSpeed,项目名称:nhglib,代码行数:6,代码来源:ParticleRenderingSystem.java


示例7: getParticleSystem

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的package包/类
public ParticleSystem getParticleSystem() {
    return particleSystem;
}
 
开发者ID:MovementSpeed,项目名称:nhglib,代码行数:4,代码来源:ParticleRenderingSystem.java


示例8: ParticleUtils

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的package包/类
public ParticleUtils() {
    particleSystem = ParticleSystem.get();
}
 
开发者ID:ToxSickCoder,项目名称:Skyland,代码行数:4,代码来源:ParticleUtils.java


示例9: updateAndDraw

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的package包/类
public ParticleSystem updateAndDraw() {
    update();
    return particleSystem;
}
 
开发者ID:ToxSickCoder,项目名称:Skyland,代码行数:5,代码来源:ParticleUtils.java


示例10: initParticles

import com.badlogic.gdx.graphics.g3d.particles.ParticleSystem; //导入依赖的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.ParticleSystem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java FilterOption类代码示例发布时间:2022-05-23
下一篇:
Java MapperAnnotationBuilder类代码示例发布时间: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