Contents
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 Summary
Modifier and TypeMethodDescriptionvoidcleanup()Perform whatever cleanup is necessary in this view at a regular intervalgetUpdatedView(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) Returns the updated view if the current is outdatedvoidinitialiseEntity(Ref<EntityStore> ref, BlackboardSubscription subscription) Initializes the given entity with any data relevant to the view.booleanisOutdated(Ref<EntityStore> ref, Store<EntityStore> store) Checks whether the current view is outdated for the given NPC and if they need to fetch a new onevoidPerform any final cleanup when the world is removed
-
Method Details
-
isOutdated
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 NPCstore- 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 viewcomponentAccessor- TheComponentAccessorfor component access- Returns:
- the updated view
-
initialiseEntity
Initializes the given entity with any data relevant to the view.- Parameters:
ref- The entity referencesubscription- TheBlackboardSubscriptionholding 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
-