public boolean touchDown (int x, int y, int pointer, int newParam) { // effect.setPosition(x, Gdx.graphics.getHeight() - y); ParticleEmitter emitter = emitters.get(emitterIndex); particleCount += 100; System.out.println(particleCount); particleCount = Math.max(0, particleCount); if (particleCount > emitter.getMaxParticleCount()) emitter.setMaxParticleCount(particleCount * 2); emitter.getEmission().setHigh(particleCount / emitter.getLife().getHighMax() * 1000); effect.getEmitters().clear(); effect.getEmitters().add(emitter); return false; }
lowMaxSlider.setValue(value.getLowMax()); highMinSlider.setValue(value.getHighMin()); highMaxSlider.setValue(value.getHighMax()); chart.setValues(value.getTimeline(), value.getScaling()); relativeCheckBox.setSelected(value.isRelative()); if (value.getHighMin() == value.getHighMax()) highRangeButton.doClick(0);
lowMaxSlider.setValue(value.getLowMax()); highMinSlider.setValue(value.getHighMin()); highMaxSlider.setValue(value.getHighMax()); chart.setValues(value.getTimeline(), value.getScaling()); relativeCheckBox.setSelected(value.isRelative()); if (value.getHighMin() == value.getHighMax()) highRangeButton.doClick(0);
lowMaxSlider.setValue(value.getLowMax()); highMinSlider.setValue(value.getHighMin()); highMaxSlider.setValue(value.getHighMax()); chart.setValues(value.getTimeline(), value.getScaling()); relativeCheckBox.setSelected(value.isRelative()); if (value.getHighMin() == value.getHighMax()) highRangeButton.doClick(0);
public SmokeEffect (TrackEffect owner) { this.owner = owner; effect = new ParticleEffect(); effect.load(Gdx.files.internal("data/partfx/smoke-small.p"), Art.particles, ""); baseEmitter = effect.getEmitters().get(0); MaxParticleLifeMinMs = baseEmitter.getLife().getHighMin(); MaxParticleLifeMaxMs = baseEmitter.getLife().getHighMax(); OriginalParticleScaling = baseEmitter.getScale().getHighMax(); // MaxParticlesPerEmitterPerSec = baseEmitter.getEmission().getHighMax(); effect.start(); }
public void flipY () { angleValue.setHigh(-angleValue.getHighMin(), -angleValue.getHighMax()); angleValue.setLow(-angleValue.getLowMin(), -angleValue.getLowMax()); gravityValue.setHigh(-gravityValue.getHighMin(), -gravityValue.getHighMax()); gravityValue.setLow(-gravityValue.getLowMin(), -gravityValue.getLowMax()); windValue.setHigh(-windValue.getHighMin(), -windValue.getHighMax()); windValue.setLow(-windValue.getLowMin(), -windValue.getLowMax()); rotationValue.setHigh(-rotationValue.getHighMin(), -rotationValue.getHighMax()); rotationValue.setLow(-rotationValue.getLowMin(), -rotationValue.getLowMax()); yOffsetValue.setLow(-yOffsetValue.getLowMin(), -yOffsetValue.getLowMax()); }
public boolean keyDown (int keycode) { ParticleEmitter emitter = emitters.get(emitterIndex); if (keycode == Input.Keys.DPAD_UP) particleCount += 5; else if (keycode == Input.Keys.PLUS) { emitter = new ParticleEmitter(emitter); } else if (keycode == Input.Keys.DPAD_DOWN) particleCount -= 5; else if (keycode == Input.Keys.SPACE) { emitterIndex = (emitterIndex + 1) % emitters.size; emitter = emitters.get(emitterIndex); // if we've previously stopped the emitter reset it if (emitter.isComplete()) emitter.reset(); particleCount = (int)(emitter.getEmission().getHighMax() * emitter.getLife().getHighMax() / 1000f); } else if (keycode == Input.Keys.ENTER) { emitter = emitters.get(emitterIndex); if (emitter.isComplete()) emitter.reset(); else emitter.allowCompletion(); } else return false; particleCount = Math.max(0, particleCount); if (particleCount > emitter.getMaxParticleCount()) emitter.setMaxParticleCount(particleCount * 2); emitter.getEmission().setHigh(particleCount / emitter.getLife().getHighMax() * 1000); effect.getEmitters().clear(); effect.getEmitters().add(emitter); return false; }
public void flipY () { angleValue.setHigh(-angleValue.getHighMin(), -angleValue.getHighMax()); angleValue.setLow(-angleValue.getLowMin(), -angleValue.getLowMax()); gravityValue.setHigh(-gravityValue.getHighMin(), -gravityValue.getHighMax()); gravityValue.setLow(-gravityValue.getLowMin(), -gravityValue.getLowMax()); windValue.setHigh(-windValue.getHighMin(), -windValue.getHighMax()); windValue.setLow(-windValue.getLowMin(), -windValue.getLowMax()); rotationValue.setHigh(-rotationValue.getHighMin(), -rotationValue.getHighMax()); rotationValue.setLow(-rotationValue.getLowMin(), -rotationValue.getLowMax()); yOffsetValue.setLow(-yOffsetValue.getLowMin(), -yOffsetValue.getLowMax()); }
public void flipY () { angleValue.setHigh(-angleValue.getHighMin(), -angleValue.getHighMax()); angleValue.setLow(-angleValue.getLowMin(), -angleValue.getLowMax()); gravityValue.setHigh(-gravityValue.getHighMin(), -gravityValue.getHighMax()); gravityValue.setLow(-gravityValue.getLowMin(), -gravityValue.getLowMax()); windValue.setHigh(-windValue.getHighMin(), -windValue.getHighMax()); windValue.setLow(-windValue.getLowMin(), -windValue.getLowMax()); rotationValue.setHigh(-rotationValue.getHighMin(), -rotationValue.getHighMax()); rotationValue.setLow(-rotationValue.getLowMin(), -rotationValue.getLowMax()); yOffsetValue.setLow(-yOffsetValue.getLowMin(), -yOffsetValue.getLowMax()); }