public class PickupItemSystem extends EntityTickingSystem
System for handling pickupitem mechanics. Systems contain game logic that operates on entities with specific component types.
java.lang.Object > EntityTickingSystem > PickupItemSystem
Field Summary
pickupItemComponent
final
PickupItemComponent
pickupItemComponent
Field pickupItemComponent.
targetRef
final
Ref
targetRef
Field targetRef.
transformComponent
final
TransformComponent
transformComponent
Field transformComponent.
position
final
Vector3d
position
Field position.
targetTransformComponent
final
TransformComponent
targetTransformComponent
Field targetTransformComponent.
targetPosition
final
Vector3d
targetPosition
Field targetPosition.
targetModelComponent
final
ModelComponent
targetModelComponent
Field targetModelComponent.
targetModelEyeHeight
final
float
targetModelEyeHeight
Field targetModelEyeHeight.
remainingTime
final
float
remainingTime
Field remainingTime.
originalLifeTime
final
float
originalLifeTime
Field originalLifeTime.
progress
final
float
progress
Field progress.
Method Detail
PickupItemSystem
public
public
PickupItemSystem
(@Nonnull final ComponentType pickupItemComponentType, @Nonnull final ComponentType transformComponentType)
Method PickupItemSystem.
- Parameters:
@Nonnull final ComponentTypepickupItemComponentType@Nonnull final ComponentTypetransformComponentType
tick
public
void
tick
(final float dt, final int index, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method tick.
- Parameters:
final floatdtfinal intindex@Nonnull final ArchetypeChunkarchetypeChunk@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
updateMovement
static
boolean
updateMovement
(@Nonnull final PickupItemComponent pickupItemComponent, @Nonnull final Vector3d current, @Nonnull final Vector3d target, final float dt)
Method updateMovement.
- Parameters:
@Nonnull final PickupItemComponentpickupItemComponent@Nonnull final Vector3dcurrent@Nonnull final Vector3dtargetfinal floatdt