use of eidolons.libgdx.anims.CompositeAnim in project Eidolons by IDemiurge.
the class DC_SoundMaster method bindEvents.
public static void bindEvents() {
GuiEventManager.bind(GuiEventType.ANIMATION_STARTED, p -> {
Anim anim = (Anim) p.get();
DC_ActiveObj activeObj = (DC_ActiveObj) anim.getActive();
try {
// TODO ON SEPARATE THREAD!!!!
playAnimStartSound(activeObj, anim.getPart());
} catch (Exception e) {
// main.system.ExceptionMaster.printStackTrace(e);
}
});
GuiEventManager.bind(GuiEventType.COMPOSITE_ANIMATION_STARTED, p -> {
CompositeAnim anim = (CompositeAnim) p.get();
DC_ActiveObj activeObj = (DC_ActiveObj) anim.getActive();
try {
playActionStartSound(activeObj);
} catch (Exception e) {
main.system.ExceptionMaster.printStackTrace(e);
}
});
}
use of eidolons.libgdx.anims.CompositeAnim in project Eidolons by IDemiurge.
the class EmitterController method setForActive.
public void setForActive() {
String presetPath = new FileChooser(PathFinder.getSfxPath()).launch("", "");
// ImageChooser ic = new ImageChooser();
// ic.setDefaultFileLocation(PathFinder.getSfxPath()+"images//");
// String imagePath = ic.
ActiveObj active = DC_Game.game.getManager().getActiveObj().getRef().getActive();
CompositeAnim anim = AnimMaster.getInstance().getConstructor().getOrCreate(active);
// ANIM_PART part = ANIM_PART.IMPACT;
anim.getMap().keySet().forEach(part -> {
// anim.getMap().get(part).getData().setValue();
List<EmitterActor> list = EmitterPools.getEmitters(presetPath);
anim.getMap().get(part).setEmitterList(list);
});
// impact?
}
use of eidolons.libgdx.anims.CompositeAnim in project Eidolons by IDemiurge.
the class FloatingTextMaster method addFloatingTextForEventAnim.
public void addFloatingTextForEventAnim(Event e, CompositeAnim compositeAnim) {
TEXT_CASES CASE = getCase(e);
if (CASE == null) {
return;
}
ANIM_PART part = getPart(CASE);
Anim anim = compositeAnim.getMap().get(part);
if (anim == null) {
if (compositeAnim.getMap().values().iterator().hasNext())
return;
anim = compositeAnim.getMap().values().iterator().next();
}
Object[] args = CASE.getArgs(e);
DC_ActiveObj active = (DC_ActiveObj) e.getRef().getActive();
float delay = 0;
for (Object arg : args) {
FloatingText floatingText = addFloatingText(active, CASE, arg, anim, delay);
delay += floatingText.getDuration() / 2;
LogMaster.log(1, e + "***** adding floating text for " + anim + " : " + floatingText);
}
}
Aggregations