当前位置: 首页>>代码示例>>Java>>正文


Java ParticleEmitter.setParticleInfluencer方法代码示例

本文整理汇总了Java中com.jme3.effect.ParticleEmitter.setParticleInfluencer方法的典型用法代码示例。如果您正苦于以下问题:Java ParticleEmitter.setParticleInfluencer方法的具体用法?Java ParticleEmitter.setParticleInfluencer怎么用?Java ParticleEmitter.setParticleInfluencer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jme3.effect.ParticleEmitter的用法示例。


在下文中一共展示了ParticleEmitter.setParticleInfluencer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createTrailEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createTrailEmitter() {
    ParticleEmitter trail = new ParticleEmitter("trail-emitter",
            ParticleMesh.Type.Triangle, 650);
    Material mat
            = new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assets.loadTexture("Effects/smoketrail.png"));
    trail.setMaterial(mat);
    trail.setImagesX(1);
    trail.setImagesY(3);
    trail.setSelectRandomImage(true);
    trail.setStartColor(new ColorRGBA(0.7f, 0.7f, 0.7f, 0.7f));
    trail.setParticleInfluencer(new ParticleInfluencerWithAngleSetting());
    trail.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    trail.getParticleInfluencer().setVelocityVariation(0f);
    trail.setStartSize(1.7f);
    trail.setEndSize(1.7f);
    trail.setGravity(Vector3f.ZERO);
    trail.setLowLife(0.3f);
    trail.setHighLife(0.3f);
    trail.setParticlesPerSec(2000);
    trail.setFaceNormal(Vector3f.UNIT_Y);

    trail.setRandomAngle(true);
    return trail;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:26,代码来源:BlindingRay.java

示例2: createTrailEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createTrailEmitter() {
    ParticleEmitter trail = new ParticleEmitter("trail-emitter",
            ParticleMesh.Type.Triangle, 650);
    Material mat
            = new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assets.loadTexture("Effects/smoketrail.png"));
    trail.setMaterial(mat);
    trail.setImagesX(1);
    trail.setImagesY(3);
    trail.setSelectRandomImage(true);
    trail.setStartColor(new ColorRGBA(0.3f, 0.3f, 0.9f, 1f));
    trail.setParticleInfluencer(new ParticleInfluencerWithAngleSetting());
    trail.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    trail.getParticleInfluencer().setVelocityVariation(0f);
    trail.setStartSize(2f);
    trail.setEndSize(2f);
    trail.setGravity(Vector3f.ZERO);
    trail.setLowLife(0.3f);
    trail.setHighLife(0.3f);
    trail.setParticlesPerSec(2000);
    trail.setFaceNormal(Vector3f.UNIT_Y);
    return trail;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:24,代码来源:Railgun.java

示例3: createTrailEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createTrailEmitter() {
    ParticleEmitter trail = new ParticleEmitter("trail-emitter",
            ParticleMesh.Type.Triangle, 650);
    Material mat
            = new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assets.loadTexture("Effects/smoketrail.png"));
    trail.setMaterial(mat);
    trail.setImagesX(1);
    trail.setImagesY(3);
    trail.setSelectRandomImage(true);
    trail.setStartColor(new ColorRGBA(0.3f, 0.3f, 0.9f, 0.6f));
    trail.setParticleInfluencer(new ParticleInfluencerWithAngleSetting());
    trail.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    trail.getParticleInfluencer().setVelocityVariation(0f);
    trail.setStartSize(1f);
    trail.setEndSize(1f);
    trail.setGravity(Vector3f.ZERO);
    trail.setLowLife(0.2f);
    trail.setHighLife(0.2f);
    trail.setParticlesPerSec(2000);
    trail.setFaceNormal(Vector3f.UNIT_Y);
    return trail;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:24,代码来源:Disc.java

示例4: createParticleEffect

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createParticleEffect() {
    ParticleEmitter dust = new ParticleEmitter("smoke-puff",
            ParticleMesh.Type.Triangle, 80);
    Material material = new Material(Globals.assets,
            "Common/MatDefs/Misc/Particle.j3md");
    material.setTexture("Texture",
            Globals.assets.loadTexture("Effects/flame_alpha.png"));
    material.getAdditionalRenderState()
            .setBlendMode(RenderState.BlendMode.Alpha);
    dust.setMaterial(material);
    dust.setImagesX(2);
    dust.setImagesY(2);
    dust.setSelectRandomImage(true);
    dust.setStartColor(new ColorRGBA(0.3f, 0.15f, 0.03f, 0.3f));
    dust.setEndColor(new ColorRGBA(0.3f, 0.15f, 0.03f, 0.01f));

    RadialParticleInfluencer influencer = new RadialParticleInfluencer();
    influencer.setOrigin(Vector3f.ZERO);
    influencer.setHorizontal(false);
    influencer.setRadialVelocity(Toss.SPLASH_RADIUS / 0.5f);
    
    dust.setParticleInfluencer(influencer);

    dust.setStartSize(15.0f);
    dust.setEndSize(30.0f);
    dust.setGravity(Vector3f.ZERO);
    dust.setLowLife(0.5f);
    dust.setHighLife(0.5f);
    dust.setParticlesPerSec(0);

    dust.setRandomAngle(true);

    dust.setShape(new EmitterCircleShape(Vector3f.ZERO, 2.0f));

    return dust;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:37,代码来源:TossHitEffect.java


注:本文中的com.jme3.effect.ParticleEmitter.setParticleInfluencer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。