abstract class EntityTickingSystem
System for handling entityticking mechanics. Systems contain game logic that operates on entities with specific component types.
java.lang.Object > EntityTickingSystem
Field Summary
archetypeChunkSize
final
int
archetypeChunkSize
Field archetypeChunkSize.
task
final
ParallelTask>
task
Field task.
systemTask
final
ParallelRangeTask>
systemTask
Field systemTask.
system
private
EntityTickingSystem
system
Field system.
dt
private
float
dt
Field dt.
archetypeChunk
private
ArchetypeChunk
archetypeChunk
Field archetypeChunk.
store
private
Store
store
Field store.
commandBuffer
private
CommandBuffer
commandBuffer
Field commandBuffer.
parallelTaskSize
final
int
parallelTaskSize
Field parallelTaskSize.
taskData
final
SystemTaskData
taskData
Field taskData.
Method Detail
maybeUseParallel
static
boolean
maybeUseParallel
(final int archetypeChunkSize, final int taskCount)
Method maybeUseParallel.
- Parameters:
final intarchetypeChunkSizefinal inttaskCount
useParallel
static
boolean
useParallel
(final int archetypeChunkSize, final int taskCount)
Method useParallel.
- Parameters:
final intarchetypeChunkSizefinal inttaskCount
isParallel
public
boolean
isParallel
(final int archetypeChunkSize, final int taskCount)
Method isParallel.
- Parameters:
final intarchetypeChunkSizefinal inttaskCount
tick
public
void
tick
(final float dt, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method tick.
- Parameters:
final floatdt@Nonnull final ArchetypeChunkarchetypeChunk@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
doTick
static
void
doTick
(@Nonnull final EntityTickingSystem system, final float dt, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method doTick.
- Parameters:
@Nonnull final EntityTickingSystemsystemfinal floatdt@Nonnull final ArchetypeChunkarchetypeChunk@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
init
public
void
init
(final EntityTickingSystem system, final float dt, final ArchetypeChunk archetypeChunk, final Store store, final CommandBuffer commandBuffer)
Method init.
- Parameters:
final EntityTickingSystemsystemfinal floatdtfinal ArchetypeChunkarchetypeChunkfinal Storestorefinal CommandBuffercommandBuffer
accept
public
void
accept
(final int index)
Method accept.
- Parameters:
final intindex
clear
public
void
clear
()
Method clear.
invokeParallelTask
static
void
invokeParallelTask
(@Nonnull final ParallelTask> parallelTask, @Nonnull final CommandBuffer commandBuffer)
Method invokeParallelTask.
- Parameters:
@Nonnull final ParallelTaskparallelTask> @Nonnull final CommandBuffercommandBuffer