Interface IBlackboardView<View extends IBlackboardView<View>>

All Known Implementing Classes:
AttitudeView, BlockEventView, BlockRegionView, BlockTypeView, EntityEventView, EventView, InteractionView, PrioritisedProviderView, ResourceView

public interface IBlackboardView<View extends IBlackboardView<View>>
An interface representing a view of a blackboard allowing it to be handled in different ways Created on 25/07/2018
  • Method Details

    • isOutdated

      boolean isOutdated(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store)
      Checks whether the current view is outdated for the given NPC and if they need to fetch a new one
      Parameters:
      ref - The entity reference of the NPC
      store - The entity store for component access
      Returns:
      whether they need to query for a new view
    • getUpdatedView

      View getUpdatedView(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
      Returns the updated view if the current is outdated
      Parameters:
      ref - The NPC seeking a view
      componentAccessor - The ComponentAccessor for component access
      Returns:
      the updated view
    • initialiseEntity

      void initialiseEntity(@Nonnull Ref<EntityStore> ref, @Nonnull BlackboardSubscription subscription)
      Initializes the given entity with any data relevant to the view.
      Parameters:
      ref - The entity reference
      subscription - The BlackboardSubscription holding the entity's subscribed sets
    • cleanup

      void cleanup()
      Perform whatever cleanup is necessary in this view at a regular interval
    • onWorldRemoved

      void onWorldRemoved()
      Perform any final cleanup when the world is removed