public static Emitter createFireEmitter(GLRenderer renderer, float size, float var_angle) { Emitter emitter = new Emitter( renderer, 300, renderer.mFuzzyTextureId, 3, 100, new float[] {180f / 255, 80f / 255, 10f / 255, 1}, new float[] {0, 0, 0, 0}); emitter.var_startColor[3] = 0.3f; emitter.size = size; emitter.var_size = 5; emitter.var_angle = var_angle; emitter.speed = 10; emitter.var_speed = 5; emitter.accel_x = 20; emitter.additiveBlend = true; return emitter; }
public static void createSnow(Scene scene, Entity entity, float width) { entity.add(new Transformation(width / 2, 0, 0)); GLRenderer renderer = scene.getGame().getRenderer(); Emitter e = new Emitter( renderer, 500, ((SimpleTexture) scene.getGame().textureManager.get("snow")).textureId); e.startColor = new float[] {0.7f, 0.7f, 0.9f, 1}; e.endColor = new float[] {0.7f, 0.7f, 0.9f, 1}; e.size = 10; e.var_size = 8; e.accel_x = 0; e.accel_y = 5; e.var_accel_y = 3; e.var_x = width; e.emissionRate = width / 7300 * 25; e.life = 20; e.dimWithSize = true; entity.add(e); }