Class DamageSystems.FallDamagePlayers
- All Implemented Interfaces:
ISystem<EntityStore>, QuerySystem<EntityStore>, TickableSystem<EntityStore>
- Enclosing class:
DamageSystems
-
Nested Class Summary
Nested classes/interfaces inherited from class EntityTickingSystem
EntityTickingSystem.SystemTaskData<ECS_TYPE> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe minimum amount of damage that can be applied from falling.Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGroup()getQuery()booleanisParallel(int archetypeChunkSize, int taskCount) voidtick(float dt, int index, ArchetypeChunk<EntityStore> archetypeChunk, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer) Required reading:CommandBuffervoidtick(float dt, int systemIndex, Store<EntityStore> store) Required reading:CommandBufferMethods inherited from class EntityTickingSystem
doTick, tickMethods inherited from class ArchetypeTickingSystem
isExplicitQuery, testMethods 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
onSystemRegistered, onSystemUnregisteredMethods inherited from interface QuerySystem
getHierarchyScope
-
Field Details
-
MIN_DAMAGE
public static final double MIN_DAMAGEThe minimum amount of damage that can be applied from falling.- See Also:
-
-
Constructor Details
-
FallDamagePlayers
public FallDamagePlayers()
-
-
Method Details
-
getGroup
- Returns:
- the group this system is a part of or
null. - See Also:
-
getQuery
-
getDependencies
-
tick
Description copied from class:TickingSystem- Specified by:
tickin interfaceTickableSystem<EntityStore>- Overrides:
tickin classArchetypeTickingSystem<EntityStore>- Parameters:
dt- The delta time in seconds.systemIndex- The index of this system, used for faster lookups inStore.
-
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.
-
isParallel
public boolean isParallel(int archetypeChunkSize, int taskCount) - Overrides:
isParallelin classEntityTickingSystem<EntityStore>- Returns:
trueif parallel ticking is enabled.- See Also:
-