/** * Creates and EffectTrack * * @param emitter the emitter of the track * @param length the length of the track (usually the length of the * animation you want to add the track to) */ public EffectTrack(ParticleEmitter emitter, float length) { this.emitter = emitter; //saving particles per second value this.particlesPerSeconds = emitter.getParticlesPerSec(); //setting the emmitter to not emmit. this.emitter.setParticlesPerSec(0); this.length = length; //Marking the emitter with a reference to this track for further use in deserialization. setUserData(this); }
/** * Sets the Emitter to use in this track * * @param emitter */ public void setEmitter(ParticleEmitter emitter) { if (this.emitter != null) { TrackInfo data = (TrackInfo) emitter.getUserData("TrackInfo"); data.getTracks().remove(this); } this.emitter = emitter; //saving particles per second value this.particlesPerSeconds = emitter.getParticlesPerSec(); //setting the emmitter to not emmit. this.emitter.setParticlesPerSec(0); setUserData(this); }
/** * Creates and EffectTrack * * @param emitter the emitter of the track * @param length the length of the track (usually the length of the * animation you want to add the track to) */ public EffectTrack(ParticleEmitter emitter, float length) { this.emitter = emitter; //saving particles per second value this.particlesPerSeconds = emitter.getParticlesPerSec(); //setting the emmitter to not emmit. this.emitter.setParticlesPerSec(0); this.length = length; //Marking the emitter with a reference to this track for further use in deserialization. setUserData(this); }
/** * Creates and EffectTrack * * @param emitter the emmitter of the track * @param length the length of the track (usually the length of the * animation you want to add the track to) */ public EffectTrack(ParticleEmitter emitter, float length) { this.emitter = emitter; //saving particles per second value this.particlesPerSeconds = emitter.getParticlesPerSec(); //setting the emmitter to not emmit. this.emitter.setParticlesPerSec(0); this.length = length; //Marking the emitter with a reference to this track for further use in deserialization. setUserData(this); }
/** * Sets the Emitter to use in this track * * @param emitter */ public void setEmitter(ParticleEmitter emitter) { if (this.emitter != null) { TrackInfo data = (TrackInfo) emitter.getUserData("TrackInfo"); data.getTracks().remove(this); } this.emitter = emitter; //saving particles per second value this.particlesPerSeconds = emitter.getParticlesPerSec(); //setting the emmitter to not emmit. this.emitter.setParticlesPerSec(0); setUserData(this); }
/** * Sets the Emitter to use in this track * * @param emitter */ public void setEmitter(ParticleEmitter emitter) { if (this.emitter != null) { TrackInfo data = (TrackInfo) emitter.getUserData("TrackInfo"); data.getTracks().remove(this); } this.emitter = emitter; //saving particles per second value this.particlesPerSeconds = emitter.getParticlesPerSec(); //setting the emmitter to not emmit. this.emitter.setParticlesPerSec(0); setUserData(this); }