Interface IAttitudeProvider


public interface IAttitudeProvider
An interface class for defining various Attitude providers for use with NPCs.
  • Field Details

  • 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 entity
      sourceRoleIndex - The role index of the source entity (-1 for non-NPC entities)
      target - The entity reference of the target to check attitude for
      componentAccessor - The accessor for looking up components
      Returns:
      the attitude, or null if this provider is not equipped to evaluate it