/** Generally called by the Emitter. This method will notify all the sub systems that a given amount of particles has been * activated. */ public void activateParticles (int startIndex, int count) { emitter.activateParticles(startIndex, count); for (Influencer influencer : influencers) influencer.activateParticles(startIndex, count); }
/** @return a copy of this controller */ public ParticleController copy () { Emitter emitter = (Emitter)this.emitter.copy(); Influencer[] influencers = new Influencer[this.influencers.size]; int i = 0; for (Influencer influencer : this.influencers) { influencers[i++] = (Influencer)influencer.copy(); } return new ParticleController(new String(this.name), emitter, (ParticleControllerRenderer<?, ?>)renderer.copy(), influencers); }
public void dispose () { emitter.dispose(); for (Influencer influencer : influencers) influencer.dispose(); }
public void init () { super.init(); emissionDelta = 0; durationTimer = duration; }
@Override public void read (Json json, JsonValue jsonData) { super.read(json, jsonData); continuous = json.readValue("continous", boolean.class, jsonData); emissionValue = json.readValue("emission", ScaledNumericValue.class, jsonData); delayValue = json.readValue("delay", RangedNumericValue.class, jsonData); durationValue = json.readValue("duration", RangedNumericValue.class, jsonData); lifeValue = json.readValue("life", ScaledNumericValue.class, jsonData); lifeOffsetValue = json.readValue("lifeOffset", ScaledNumericValue.class, jsonData); } }
@Override public void load (AssetManager manager, ResourceData data) { emitter.load(manager, data); for (Influencer influencer : influencers) influencer.load(manager, data); renderer.load(manager, data); } }
/** End the simulation. */ public void end () { for (Influencer influencer : influencers) influencer.end(); emitter.end(); }
/** Generally called by the Emitter. This method will notify all the sub systems that a given amount of particles has been * killed. */ public void killParticles (int startIndex, int count) { emitter.killParticles(startIndex, count); for (Influencer influencer : influencers) influencer.killParticles(startIndex, count); }
protected void allocateChannels (int maxParticleCount) { particles = new ParallelArray(maxParticleCount); // Alloc additional channels emitter.allocateChannels(); for (Influencer influencer : influencers) influencer.allocateChannels(); renderer.allocateChannels(); }
public boolean isComplete () { return emitter.isComplete(); }
public void init () { super.init(); emissionDelta = 0; durationTimer = duration; }
@Override public void read (Json json, JsonValue jsonData) { super.read(json, jsonData); continuous = json.readValue("continous", boolean.class, jsonData); emissionValue = json.readValue("emission", ScaledNumericValue.class, jsonData); delayValue = json.readValue("delay", RangedNumericValue.class, jsonData); durationValue = json.readValue("duration", RangedNumericValue.class, jsonData); lifeValue = json.readValue("life", ScaledNumericValue.class, jsonData); lifeOffsetValue = json.readValue("lifeOffset", ScaledNumericValue.class, jsonData); } }
@Override public void load (AssetManager manager, ResourceData data) { emitter.load(manager, data); for (Influencer influencer : influencers) influencer.load(manager, data); renderer.load(manager, data); } }
/** End the simulation. */ public void end () { for (Influencer influencer : influencers) influencer.end(); emitter.end(); }
/** Generally called by the Emitter. This method will notify all the sub systems that a given amount of particles has been * killed. */ public void killParticles (int startIndex, int count) { emitter.killParticles(startIndex, count); for (Influencer influencer : influencers) influencer.killParticles(startIndex, count); }
protected void allocateChannels (int maxParticleCount) { particles = new ParallelArray(maxParticleCount); // Alloc additional channels emitter.allocateChannels(); for (Influencer influencer : influencers) influencer.allocateChannels(); renderer.allocateChannels(); }
public boolean isComplete () { return emitter.isComplete(); }
/** Initialize the controller. All the sub systems will be initialized and binded to the controller. Must be called before any * other method. */ public void init () { bind(); if (particles != null) { end(); particleChannels.resetIds(); } allocateChannels(emitter.maxParticleCount); emitter.init(); for (Influencer influencer : influencers) influencer.init(); renderer.init(); }
@Override public void read (Json json, JsonValue jsonData) { super.read(json, jsonData); continuous = json.readValue("continous", boolean.class, jsonData); emissionValue = json.readValue("emission", ScaledNumericValue.class, jsonData); delayValue = json.readValue("delay", RangedNumericValue.class, jsonData); durationValue = json.readValue("duration", RangedNumericValue.class, jsonData); lifeValue = json.readValue("life", ScaledNumericValue.class, jsonData); lifeOffsetValue = json.readValue("lifeOffset", ScaledNumericValue.class, jsonData); } }
@Override public void load (AssetManager manager, ResourceData data) { emitter.load(manager, data); for (Influencer influencer : influencers) influencer.load(manager, data); renderer.load(manager, data); } }