public static HealthRecoveryEvent alloc(Entity p_targetEntity, HealthRecoveryTrigger p_healthRecoveryComponent) { HealthRecoveryEvent l_instance = new HealthRecoveryEvent(); l_instance.TargetEntity = p_targetEntity; l_instance.HealthRecoveryComponent = p_healthRecoveryComponent; return(l_instance); }
public void OnTriggerEnter(Entity p_other, List <AEvent> p_producedEventsStack) { if (EntityComponent.get_component <Health>(p_other) != null) { p_producedEventsStack.Add(HealthRecoveryEvent.alloc(p_other, this)); EntityEventsComposition.addEntityDestroyedEvents(p_producedEventsStack, AssociatedEntity); } }