use of eidolons.entity.active.DC_ActiveObj in project Eidolons by IDemiurge.
the class DcHelper method doAction.
@Override
public void doAction(Unit source, String name, Context context, boolean waitForCompletion) {
DC_ActiveObj action = source.getAction(name);
assertTrue(action != null);
doAction(action, context, waitForCompletion);
}
use of eidolons.entity.active.DC_ActiveObj in project Eidolons by IDemiurge.
the class Executor method checkPendingAttacksOfOpportunity.
private void checkPendingAttacksOfOpportunity() {
for (DC_ActiveObj attack : new ArrayList<>(getPendingAttacksOpportunity())) {
if (!AttackOfOpportunityRule.checkPendingAttackProceeds(getAction().getOwnerObj(), attack)) {
continue;
}
getPendingAttacksOpportunity().remove(attack);
Ref REF = Ref.getCopy(attack.getRef());
REF.setTarget(getAction().getOwnerObj().getId());
attack.activatedOn(REF);
}
}
use of eidolons.entity.active.DC_ActiveObj 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