use of eidolons.libgdx.anims.particles.EmitterActor in project Eidolons by IDemiurge.
the class EmitterController method add.
public void add(String presetPath, String imagePath) {
EmitterActor actor = null;
try {
actor = new EmitterActor(presetPath, true) {
@Override
public void draw(Batch batch, float parentAlpha) {
act(Gdx.graphics.getDeltaTime());
// Vector2 v = GridMaster.getMouseCoordinates();
// setPosition(v.x, v.y);
super.draw(batch, parentAlpha);
}
};
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
return;
}
if (imagePath != null) {
actor.getEffect().setImagePath(imagePath);
}
add(actor, null);
}
use of eidolons.libgdx.anims.particles.EmitterActor in project Eidolons by IDemiurge.
the class EmitterController method modify.
private void modify(SFX_MODIFICATION_PRESET preset) {
EMITTER_VALUE_GROUP group = getValGroup(preset);
String val = getValue(preset);
String modVals = (val == null) ? "" : group + EmitterPresetMaster.value_separator + val;
EmitterActor newActor = EmitterPresetMaster.getInstance().getModifiedEmitter(last.path, true, modVals);
if (val == null) {
newActor.getEffect().toggle(group.getFieldName());
}
add(newActor, new Vector2(last.getX() + // newActor.getEffect().getBoundingBox().getWidth()
100, last.getY()));
}
Aggregations