Class EntityTrackerSystems.AddToVisible
- All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>, TickableSystem<EntityStore>
- Enclosing class:
EntityTrackerSystems
-
Nested Class Summary
Nested classes/interfaces inherited from class EntityTickingSystem
EntityTickingSystem.SystemTaskData<ECS_TYPE> -
Field Summary
FieldsFields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionAddToVisible(ComponentType<EntityStore, EntityTrackerSystems.EntityViewer> entityViewerComponentType, ComponentType<EntityStore, EntityTrackerSystems.Visible> visibleComponentType) -
Method Summary
Modifier and TypeMethodDescriptiongetQuery()booleanisParallel(int archetypeChunkSize, int taskCount) voidtick(float dt, int index, ArchetypeChunk<EntityStore> archetypeChunk, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer) Required reading:CommandBufferMethods inherited from class EntityTickingSystem
doTick, tickMethods inherited from class ArchetypeTickingSystem
isExplicitQuery, test, tickMethods inherited from class System
getComponentRegistrations, getResourceRegistrations, registerResource, registerResourceMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISystem
getGroup, onSystemRegistered, onSystemUnregisteredMethods inherited from interface QuerySystem
getHierarchyScope
-
Field Details
-
DEPENDENCIES
-
-
Constructor Details
-
AddToVisible
public AddToVisible(@Nonnull ComponentType<EntityStore, EntityTrackerSystems.EntityViewer> entityViewerComponentType, @Nonnull ComponentType<EntityStore, EntityTrackerSystems.Visible> visibleComponentType)
-
-
Method Details
-
getDependencies
-
getQuery
-
isParallel
public boolean isParallel(int archetypeChunkSize, int taskCount) - Overrides:
isParallelin classEntityTickingSystem<EntityStore>- Returns:
trueif parallel ticking is enabled.- See Also:
-
tick
public void tick(float dt, int index, @Nonnull ArchetypeChunk<EntityStore> archetypeChunk, @Nonnull Store<EntityStore> store, @Nonnull CommandBuffer<EntityStore> commandBuffer) Description copied from class:EntityTickingSystemRequired reading:CommandBufferCalled once per world tick for each 'entity' inside of an
ArchetypeChunkwith anArchetypethat fulfills theQueryprovided byQuerySystem.getQuery()}.If
EntityTickingSystem.isParallel(int, int)returns true then this is called from a worker thread in the thread pool NOT from the world thread. When working with a parallel system special care must be taken to ensure data that is accessed is done so in a thead safe manor and that all components that have data that is modified are present in theReadWriteArchetypeQuery.getWriteArchetype(). TODO: Expand docs to talk more about how other query types tie into this.To access component data when using this method you should use the following:
var component = archetypeChunk.getComponent(index, componentType);- Specified by:
tickin classEntityTickingSystem<EntityStore>- Parameters:
dt- The delta time in seconds.index- The index of the entity in theArchetypeChunk.
-