@Override protected void begin(UniqueOperation op, OperationTree node) { super.begin(op, node); for (OperationTree root : allOperations(op)) root.findAll(UniqueOperation.class, out); for (UniqueOperation operation : out) { if (operation != op && op.tag.equals(operation.tag)) operation.completed = true; } out.clear(); }
@Override protected float act(float delta, UniqueOperation op, OperationTree node) { if (op.completed) // avoid processing the tick it was return delta; // invalidated by another unique OperationTree wrapped = node.children().get(0); delta = wrapped.act(delta); op.completed = wrapped.isComplete(); return delta; }