ProcessorCollectionComponent pcc = (ProcessorCollectionComponent) entity.getComponent(ProcessorCollectionComponent.class);
if (pcc == null) {
pcc = new ProcessorCollectionComponent();
entity.addComponent(ProcessorCollectionComponent.class, pcc);
}
pcc.addProcessor(pc);
}
/** Remove the given processor component from the given entity. */
private static void removeProcessorCompFromEntity (ProcessorComponent pc, Entity entity) {
ProcessorCollectionComponent pcc = (ProcessorCollectionComponent) entity.getComponent(ProcessorCollectionComponent.class);