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


Java ParticleEmitter.setRandomAngle方法代码示例

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


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

示例1: createDebris

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createDebris(){
        debris = new ParticleEmitter("Debris", Type.Triangle, 15 * COUNT_FACTOR);
        debris.setSelectRandomImage(true);
        debris.setRandomAngle(true);
        debris.setRotateSpeed(FastMath.TWO_PI * 4);
        debris.setStartColor(new ColorRGBA(1f, 0.59f, 0.28f, (float) (1.0f / COUNT_FACTOR_F)));
        debris.setEndColor(new ColorRGBA(.5f, 0.5f, 0.5f, 0f));
        debris.setStartSize(.2f);
        debris.setEndSize(.2f);

//        debris.setShape(new EmitterSphereShape(Vector3f.ZERO, .05f));
        debris.setParticlesPerSec(0);
        debris.setGravity(0, 12f, 0);
        debris.setLowLife(1.4f);
        debris.setHighLife(1.5f);
        debris.setInitialVelocity(new Vector3f(0, 15, 0));
        debris.setVelocityVariation(.60f);
        debris.setImagesX(3);
        debris.setImagesY(3);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
        mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/Debris.png"));
        debris.setMaterial(mat);
        explosionEffect.attachChild(debris);
    }
 
开发者ID:mleoking,项目名称:PhET,代码行数:25,代码来源:TestExplosionEffect.java

示例2: createFire

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createFire() {
    fire = new ParticleEmitter("Emitter", ParticleMesh.Type.Triangle, 200);
    Material fire_mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    fire_mat.setTexture("Texture", assetManager.loadTexture("Effects/flame.png"));
    fire.setMaterial(fire_mat);
    fire.setImagesX(2);
    fire.setImagesY(2);
    fire.setRandomAngle(true);
    attachChild(fire);

    fire.setStartColor(new ColorRGBA(1f, 1f, .5f, 1f));
    fire.setEndColor(new ColorRGBA(1f, 0f, 0f, 0f));
    fire.setGravity(0, 0, 0);
    fire.setStartSize(10f);
    fire.setEndSize(1f);
    fire.setLowLife(2f);
    fire.setHighLife(3f);
    fire.getParticleInfluencer().setVelocityVariation(4f);
    fire.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 3f, 0));
    fire.setParticlesPerSec(0);
}
 
开发者ID:kemonoske,项目名称:ArcaneMining,代码行数:22,代码来源:Explosion.java

示例3: createSmoke

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createSmoke() {
    smoke = new ParticleEmitter("Smoke emitter", Type.Triangle, 40);
    Material smoke_mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    smoke_mat.setTexture("Texture", assetManager.loadTexture("Effects/smoke.png"));
    smoke.setMaterial(smoke_mat);
    smoke.setImagesX(2);
    smoke.setImagesY(2);
    smoke.setSelectRandomImage(true);
    attachChild(smoke);

    debris.setStartColor(new ColorRGBA(0.5f, 0.5f, 0.5f, .3f));
    debris.setEndColor(new ColorRGBA(.1f, 0.1f, 0.1f, 0f));
    debris.setLowLife(4f);
    debris.setHighLife(5f);
    smoke.setRandomAngle(true);
    smoke.getParticleInfluencer().setInitialVelocity(new Vector3f(0, .5f, 0));
    smoke.getParticleInfluencer().setVelocityVariation(1);

    smoke.setParticlesPerSec(0);
}
 
开发者ID:kemonoske,项目名称:ArcaneMining,代码行数:21,代码来源:Explosion.java

示例4: createDebris

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createDebris() {
    debris = new ParticleEmitter("Debris", Type.Triangle, 15);
    Material debris_mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    debris_mat.setTexture("Texture", assetManager.loadTexture("Effects/debris.png"));
    debris.setMaterial(debris_mat);
    debris.setImagesX(3);
    debris.setImagesY(3);
    debris.setSelectRandomImage(false);
    attachChild(debris);

    debris.setRandomAngle(true);
    debris.setRotateSpeed(FastMath.TWO_PI * 4);
    debris.setStartColor(new ColorRGBA(0.4f, 0.4f, 0.0f, 1.0f));
    debris.setEndColor(new ColorRGBA(0.4f, 0.4f, 0.0f, 1.0f));
    debris.setStartSize(.2f);
    debris.setEndSize(2f);
    debris.setGravity(0, 15f, 0);
    debris.setLowLife(2f);
    debris.setHighLife(3f);
    debris.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 7, 0));
    debris.getParticleInfluencer().setVelocityVariation(.60f);
    debris.setParticlesPerSec(0);

}
 
开发者ID:kemonoske,项目名称:ArcaneMining,代码行数:25,代码来源:Explosion.java

示例5: createPlasmaEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
static ParticleEmitter createPlasmaEmitter() {
    ParticleEmitter plasma = new ParticleEmitter("plasma-emitter",
            ParticleMesh.Type.Triangle, 200);
    Material materialRed = new Material(assets,
            "Common/MatDefs/Misc/Particle.j3md");
    materialRed.setTexture("Texture",
            assets.loadTexture("Effects/plasma-particle.png"));
    plasma.setMaterial(materialRed);
    plasma.setImagesX(2);
    plasma.setImagesY(2);
    plasma.setSelectRandomImage(true);
    plasma.setStartColor(new ColorRGBA(0.8f, 0.350f, 0.9f, 1.0f));
    plasma.setEndColor(new ColorRGBA(0.80f, 0.30f, 0.9f, 0.95f));
    plasma.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    plasma.setStartSize(5.5f);
    plasma.setEndSize(4.5f);
    plasma.setGravity(Vector3f.ZERO);
    plasma.setLowLife(0.05f);
    plasma.setHighLife(0.05f);
    plasma.setParticlesPerSec(100);

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

示例6: createFireEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createFireEmitter() {
    ParticleEmitter fire = new ParticleEmitter("fire-emitter",
            ParticleMesh.Type.Triangle, 300);
    Material materialRed = new Material(assets,
            "Common/MatDefs/Misc/Particle.j3md");
    materialRed.setTexture("Texture",
            assets.loadTexture("Effects/flame.png"));
    fire.setMaterial(materialRed);
    fire.setImagesX(2);
    fire.setImagesY(2);
    fire.setSelectRandomImage(true);
    fire.setStartColor(new ColorRGBA(0.95f, 0.15f, 0f, 1f));
    fire.setEndColor(new ColorRGBA(1f, 1f, 0f, 0.5f));
    fire.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    fire.setStartSize(3.5f);
    fire.setEndSize(1f);
    fire.setGravity(Vector3f.ZERO);
    fire.setLowLife(0.1f);
    fire.setHighLife(0.1f);
    fire.setParticlesPerSec(150);

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

示例7: createPlasmaEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createPlasmaEmitter() {
    ParticleEmitter plasma = new ParticleEmitter("plasma-emitter",
            ParticleMesh.Type.Triangle, 200);
    Material m = new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
    m.setTexture("Texture",
            assets.loadTexture("Effects/plasma-particle.png"));
    plasma.setMaterial(m);
    plasma.setImagesX(2);
    plasma.setImagesY(2);
    plasma.setSelectRandomImage(true);
    plasma.setStartColor(new ColorRGBA(0.8f, 0.350f, 0.9f, 1.0f));
    plasma.setEndColor(new ColorRGBA(0.80f, 0.30f, 0.9f, 0.95f));
    plasma.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    plasma.setStartSize(5.5f * SIZE_FACTOR);
    plasma.setEndSize(4.5f * SIZE_FACTOR);
    plasma.setGravity(Vector3f.ZERO);
    plasma.setLowLife(0.05f);
    plasma.setHighLife(0.05f);
    plasma.setParticlesPerSec(100);

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

示例8: createPurpleEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createPurpleEmitter() {
    ParticleEmitter purple = new ParticleEmitter("purple-emitter",
            ParticleMesh.Type.Triangle, 200);
    Material materialPurple = new Material(assets,
            "Common/MatDefs/Misc/Particle.j3md");
    materialPurple.setTexture("Texture",
            assets.loadTexture("Effects/flame.png"));
    purple.setMaterial(materialPurple);
    purple.setImagesX(2);
    purple.setImagesY(2);
    purple.setSelectRandomImage(true);
    purple.setStartColor(new ColorRGBA(0.8f, 0.015f, 0.8f, 1f));
    purple.setEndColor(new ColorRGBA(0.8f, 0f, 0.8f, 0.5f));
    purple.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    purple.setStartSize(2.5f);
    purple.setEndSize(1f);
    purple.setGravity(Vector3f.ZERO);
    purple.setLowLife(0.1f);
    purple.setHighLife(0.1f);
    purple.setParticlesPerSec(100);

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

示例9: createEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createEmitter() {
    ParticleEmitter spark = new ParticleEmitter("sparkle-emitter",
            ParticleMesh.Type.Triangle, 200);
    Material mat = new Material(assets,
            "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assets.loadTexture("Effects/flame.png"));
    spark.setMaterial(mat);
    spark.setImagesX(2);
    spark.setImagesY(2);
    spark.setSelectRandomImage(true);
    spark.setStartColor(new ColorRGBA(0.9f, 0.9f, 0.9f, 1.0f));
    spark.setEndColor(new ColorRGBA(0.9f, 0.9f, 0.9f, 1f));
    spark.getParticleInfluencer().setInitialVelocity(vec);
    spark.getParticleInfluencer().setVelocityVariation(0.8f);
    spark.setStartSize(1f);
    spark.setEndSize(1.0f);
    spark.setGravity(Vector3f.ZERO);
    spark.setLowLife(0.1f);
    spark.setHighLife(0.1f);
    spark.setParticlesPerSec(100);

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

示例10: createSmallExplosion

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createSmallExplosion(Node root, Vector3f location) {
    ParticleEmitter fire = new ParticleEmitter("shotgun-explosion",
            ParticleMesh.Type.Triangle, 20);

    Material material = new Material(assetManager,
            "Common/MatDefs/Misc/Particle.j3md");
    material.setTexture("Texture",
            assetManager.loadTexture("Effects/flame.png"));
    fire.setMaterial(material);
    fire.setImagesX(2);
    fire.setImagesY(2);
    fire.setSelectRandomImage(true);
    fire.setGravity(Vector3f.ZERO);

    fire.setRandomAngle(true);

    fire.setStartColor(new ColorRGBA(0.95f, 0.150f, 0.0f, 0.40f));
    fire.setEndColor(new ColorRGBA(1.0f, 1.0f, 0.0f, 0.0f));
    fire.setLowLife(0.1f);
    fire.setHighLife(0.3f);
    fire.setNumParticles(100);
    fire.setStartSize(0.50f);
    fire.setEndSize(1.0f);
    fire.getParticleInfluencer()
            .setInitialVelocity(Vector3f.UNIT_X.mult(1.0f));
    fire.getParticleInfluencer().setVelocityVariation(6f);

    fire.setShape(new EmitterSphereShape(Vector3f.ZERO, 0.2f));
    fire.setParticlesPerSec(0f);

    root.attachChild(fire);
    fire.setLocalTranslation(location);
    fire.emitAllParticles();
    fire.addControl(new CTimedExistence(1f));
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:36,代码来源:PelletBuilder.java

示例11: createBlack

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createBlack(float radius, float delay) {
    ParticleEmitter purple = new ParticleEmitter("black-emitter",
            ParticleMesh.Type.Triangle, 100 * (int) radius * (int) radius);
    Material mat
            = new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture",
            Globals.assets.loadTexture("Effects/flame_alpha.png"));
    mat.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);
    purple.setMaterial(mat);
    purple.setImagesX(2);
    purple.setImagesY(2);
    purple.setSelectRandomImage(true);
    purple.setStartColor(ElectricPull2Builder.color);
    purple.setEndColor(ElectricPull2Builder.color);
    purple.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    purple.setStartSize(2.5f);
    purple.setEndSize(4.5f);
    purple.setGravity(Vector3f.ZERO);
    purple.setLowLife(delay);
    purple.setHighLife(delay);
    purple.setParticlesPerSec(0);
    purple.getParticleInfluencer().setVelocityVariation(0f);
    purple.setRandomAngle(true);

    EmitterCircleShape emitterShape
            = new EmitterCircleShape(Vector3f.ZERO, radius);
    purple.setShape(emitterShape);

    return purple;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:31,代码来源:ElectricPull2.java

示例12: createCyan

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createCyan(float radius, float remainTime) {
    ParticleEmitter cyan = new ParticleEmitter("purple-emitter",
            ParticleMesh.Type.Triangle, 10 * (int) radius);
    Material material
            = new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
    material.setTexture("Texture",
            assets.loadTexture("Effects/flame.png"));
    cyan.setMaterial(material);
    cyan.setImagesX(2);
    cyan.setImagesY(2);
    cyan.setSelectRandomImage(true);
    cyan.setStartColor(new ColorRGBA(0.1f, 0.8f, 0.8f, 0.6f));
    cyan.setEndColor(new ColorRGBA(0.1f, 0.8f, 0.8f, 0.05f));
    cyan.getParticleInfluencer()
            .setInitialVelocity(Vector3f.UNIT_Y.mult(2f));
    cyan.setStartSize(6.5f);
    cyan.setEndSize(2.5f);
    cyan.setGravity(Vector3f.ZERO);
    cyan.setLowLife(remainTime * 0.9f);
    cyan.setHighLife(remainTime);
    cyan.setParticlesPerSec(0);
    cyan.getParticleInfluencer().setVelocityVariation(0.2f);
    cyan.setRandomAngle(true);

    EmitterCircleShape emitterShape
            = new EmitterCircleShape(Vector3f.ZERO, radius);
    cyan.setShape(emitterShape);

    return cyan;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:31,代码来源:Energize.java

示例13: createParticleEffect

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createParticleEffect() {
    ParticleEmitter dust = new ParticleEmitter("smoke-puff",
            ParticleMesh.Type.Triangle, (int)(10 * EarthQuake.RADIUS));
    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.26f, 0.16f, 0.07f, 0.2f));
    dust.setEndColor(new ColorRGBA(0.26f, 0.16f, 0.07f, 0.01f));

    dust.getParticleInfluencer()
            .setInitialVelocity(Vector3f.UNIT_Y.mult(110f));
    dust.getParticleInfluencer().setVelocityVariation(0.1f);

    dust.setStartSize(4.0f);
    dust.setEndSize(8f);
    dust.setGravity(Vector3f.UNIT_Y.mult(80));
    dust.setLowLife(2f);
    dust.setHighLife(3f);
    dust.setParticlesPerSec(0);

    dust.setRandomAngle(true);

    dust.setShape(new EmitterCircleShape(Vector3f.ZERO, EarthQuake.RADIUS));

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

示例14: createWhite

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createWhite(float radius, float remainTime) {
    ParticleEmitter purple = new ParticleEmitter("purple-emitter",
            ParticleMesh.Type.Triangle, 5 * (int) radius);
    Material material
            = new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
    material.setTexture("Texture",
            assets.loadTexture("Effects/flame.png"));
    purple.setMaterial(material);
    purple.setImagesX(2);
    purple.setImagesY(2);
    purple.setSelectRandomImage(true);
    purple.setStartColor(new ColorRGBA(0.8f, 0.8f, 0.8f, 0.8f));
    purple.setEndColor(new ColorRGBA(0.8f, 0.8f, 0.8f, 0.05f));
    purple.getParticleInfluencer()
            .setInitialVelocity(Vector3f.UNIT_Y.mult(2f));
    purple.setStartSize(4.5f);
    purple.setEndSize(4.5f);
    purple.setGravity(Vector3f.ZERO);
    purple.setLowLife(remainTime * 0.2f);
    purple.setHighLife(remainTime * 0.3f);
    purple.setParticlesPerSec(0);
    purple.getParticleInfluencer().setVelocityVariation(0.2f);
    purple.setRandomAngle(true);

    EmitterCircleShape emitterShape
            = new EmitterCircleShape(Vector3f.ZERO, radius);
    purple.setShape(emitterShape);

    return purple;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:31,代码来源:MindPoison.java

示例15: createPurple

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createPurple(float radius, float remainTime) {
    ParticleEmitter purple = new ParticleEmitter("purple-emitter",
            ParticleMesh.Type.Triangle, 10 * (int) radius);
    Material material
            = new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
    material.setTexture("Texture",
            assets.loadTexture("Effects/flame.png"));
    purple.setMaterial(material);
    purple.setImagesX(2);
    purple.setImagesY(2);
    purple.setSelectRandomImage(true);
    purple.setStartColor(new ColorRGBA(0.8f, 0.015f, 0.8f, 0.6f));
    purple.setEndColor(new ColorRGBA(0.8f, 0.015f, 0.8f, 0.05f));
    purple.getParticleInfluencer()
            .setInitialVelocity(Vector3f.UNIT_Y.mult(2f));
    purple.setStartSize(6.5f);
    purple.setEndSize(2.5f);
    purple.setGravity(Vector3f.ZERO);
    purple.setLowLife(remainTime * 0.9f);
    purple.setHighLife(remainTime);
    purple.setParticlesPerSec(0);
    purple.getParticleInfluencer().setVelocityVariation(0.2f);
    purple.setRandomAngle(true);

    EmitterCircleShape emitterShape
            = new EmitterCircleShape(Vector3f.ZERO, radius);
    purple.setShape(emitterShape);

    return purple;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:31,代码来源:MindPoison.java


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