Contents
Interface IAttitudeProvider
public interface IAttitudeProvider
An interface class for defining various
Attitude providers for use with NPCs.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetAttitude(Ref<EntityStore> ref, int sourceRoleIndex, Ref<EntityStore> target, ComponentAccessor<EntityStore> componentAccessor) Returns the attitude from the source entity to the target entity.
-
Field Details
-
OVERRIDE_PRIORITY
static final int OVERRIDE_PRIORITY- See Also:
-
-
Method Details
-
getAttitude
Attitude getAttitude(@Nonnull Ref<EntityStore> ref, int sourceRoleIndex, @Nonnull Ref<EntityStore> target, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Returns the attitude from the source entity to the target entity. Can return null if the provider is not equipped to evaluate the attitude, e.g. a provider that is only able to evaluate attitude towards Players while the provided target is another NPC.- Parameters:
ref- The entity reference of the source entitysourceRoleIndex- The role index of the source entity (-1 for non-NPC entities)target- The entity reference of the target to check attitude forcomponentAccessor- The accessor for looking up components- Returns:
- the attitude, or null if this provider is not equipped to evaluate it
-