use of com.gemserk.commons.artemis.triggers.Trigger in project commons-gdx by gemserk.
the class HitDetectionSystem method process.
@Override
protected void process(Entity e) {
HitComponent hitComponent = e.getComponent(HitComponent.class);
PhysicsComponent physicsComponent = e.getComponent(PhysicsComponent.class);
Contacts contact = physicsComponent.getContact();
Trigger trigger = hitComponent.getTrigger();
if (!contact.isInContact())
return;
if (trigger.isAlreadyTriggered())
return;
trigger.trigger(e);
}
Aggregations