List of usage examples for com.badlogic.gdx.graphics.g2d ParticleEffect ParticleEffect
public ParticleEffect(ParticleEffect effect)
From source file:com.kotcrab.vis.runtime.system.inflater.ParticleInflater.java
License:Apache License
@Override protected void inserted(int entityId) { AssetReference assetRef = assetCm.get(entityId); ProtoVisParticle protoComponent = protoCm.get(entityId); PathAsset path = (PathAsset) assetRef.asset; ParticleEffect effect = manager.get(path.getPath(), ParticleEffect.class); if (effect == null) throw new IllegalStateException("Can't load scene, particle effect is missing: " + path.getPath()); VisParticle particle = partcielCm.create(entityId); particle.setEffect(new ParticleEffect(effect)); protoComponent.fill(particle);/* w w w .j a v a 2 s .c o m*/ particle.getEffect().scaleEffect(1f / pixelsPerUnit); protoCm.remove(entityId); }
From source file:com.o2d.pkayjava.runtime.factory.component.ParticleEffectComponentFactory.java
License:Apache License
protected com.o2d.pkayjava.runtime.components.particle.ParticleComponent createParticleComponent(Entity entity, com.o2d.pkayjava.runtime.data.ParticleEffectVO vo) { com.o2d.pkayjava.runtime.components.particle.ParticleComponent component = new com.o2d.pkayjava.runtime.components.particle.ParticleComponent(); component.particleName = vo.particleName; ParticleEffect particleEffect = new ParticleEffect(rm.getParticleEffect(vo.particleName)); component.particleEffect = particleEffect; com.o2d.pkayjava.runtime.data.ProjectInfoVO projectInfoVO = rm.getProjectVO(); component.worldMultiplyer = 1f / projectInfoVO.pixelToWorld; entity.add(component);/*from w w w . j av a 2 s . co m*/ return component; }
From source file:com.turbogerm.helljump.game.platforms.movement.PlatformMovementBase.java
License:Open Source License
public PlatformMovementBase(Vector2 initialPosition, String engineImageName, String particleName, AssetManager assetManager) {//from ww w . ja va2s.co m TextureAtlas platformsAtlas = assetManager.get(ResourceNames.PLATFORMS_ATLAS); mEngineSprite = platformsAtlas.createSprite(engineImageName); mEngineSprite.setSize(ENGINE_WIDTH, ENGINE_HEIGHT); mEngineEffect = new ParticleEffect((ParticleEffect) assetManager.get(particleName)); mPosition = new Vector2(initialPosition); }
From source file:com.uwsoft.editor.data.manager.TextureManager.java
License:Apache License
public ParticleEffect getParticle(String name) { return new ParticleEffect(particleEffects.get(name)); }
From source file:com.uwsoft.editor.renderer.factory.component.ParticleEffectComponentFactory.java
License:Apache License
protected ParticleComponent createParticleComponent(Entity entity, ParticleEffectVO vo) { ParticleComponent component = new ParticleComponent(); component.particleName = vo.particleName; ParticleEffect particleEffect = new ParticleEffect(rm.getParticleEffect(vo.particleName)); component.particleEffect = particleEffect; ProjectInfoVO projectInfoVO = rm.getProjectVO(); component.worldMultiplyer = 1f / projectInfoVO.pixelToWorld; component.scaleEffect(1f);/*from w w w. j av a 2s . c om*/ entity.add(component); return component; }
From source file:de.bitbrain.craft.graphics.ParticleRenderer.java
License:Open Source License
public ParticleEffect create(String particleResource, boolean endless) { ParticleEffect original = SharedAssetManager.get(particleResource, ParticleEffect.class); ParticleEffect copy = new ParticleEffect(original); effects.put(copy, endless);/*from w w w.j a v a 2 s. c o m*/ return copy; }
From source file:de.hochschuletrier.gdw.ss15.game.components.factories.BallParticlesComponentFactory.java
@Override public void run(Entity entity, SafeProperties meta, SafeProperties properties, EntityFactoryParam param) { BallParticlesComponent component = engine.createComponent(BallParticlesComponent.class); component.currentState = EntityAnimationState.BALL_NEUTRAL; component.effect = new ParticleEffect(assetManager.getParticleEffect(properties.getString("effect"))); entity.add(component);/* ww w . j a va2s . c om*/ }
From source file:de.hochschuletrier.gdw.ss15.game.components.factories.GoalEffectComponentFactory.java
public void run(Entity entity, SafeProperties meta, SafeProperties properties, EntityFactoryParam param) { GoalEffectComponent component = engine.createComponent(GoalEffectComponent.class); component.effect = new ParticleEffect(assetManager.getParticleEffect(properties.getString("effect"))); component.effect.flipY();// ww w. ja va2 s .c o m entity.add(component); }
From source file:de.myreality.acidsnake.graphics.ParticleManager.java
License:Open Source License
public ParticleEffect create(ParticleEffect original, boolean endless) { ParticleEffect copy = new ParticleEffect(original); effects.put(copy, endless);//w w w .j a v a 2s . c om return copy; }
From source file:net.ivang.axonix.main.actors.game.level.enemies.Enemy.java
License:Apache License
@Subscribe @SuppressWarnings("unused") public void onSlowBonus(SlowBonus bonus) { ParticleEffect particles = new ParticleEffect(bonus.getParticleEffect()); effects.add(new SpeedEffect(this, 0.5f, 10, particles)); }