EntityTickingSystem

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 int archetypeChunkSize
final int taskCount

useParallel

static boolean useParallel (final int archetypeChunkSize, final int taskCount)

Method useParallel.

Parameters:
final int archetypeChunkSize
final int taskCount

isParallel

public boolean isParallel (final int archetypeChunkSize, final int taskCount)

Method isParallel.

Parameters:
final int archetypeChunkSize
final int taskCount

tick

public void tick (final float dt, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method tick.

Parameters:
final float dt
@Nonnull final ArchetypeChunk archetypeChunk
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

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 EntityTickingSystem system
final float dt
@Nonnull final ArchetypeChunk archetypeChunk
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

init

public void init (final EntityTickingSystem system, final float dt, final ArchetypeChunk archetypeChunk, final Store store, final CommandBuffer commandBuffer)

Method init.

Parameters:
final EntityTickingSystem system
final float dt
final ArchetypeChunk archetypeChunk
final Store store
final CommandBuffer commandBuffer

accept

public void accept (final int index)

Method accept.

Parameters:
final int index

clear

public void clear ()

Method clear.

invokeParallelTask

static void invokeParallelTask (@Nonnull final ParallelTask> parallelTask, @Nonnull final CommandBuffer commandBuffer)

Method invokeParallelTask.

Parameters:
@Nonnull final ParallelTask> parallelTask
@Nonnull final CommandBuffer commandBuffer