abstract class MotionSequence
Class MotionSequence. Provides motionsequence functionality for the Hytale server.
java.lang.Object > MotionSequence
Field Summary
finished
protected
boolean
finished
Field finished.
index
protected
int
index
Field index.
activeMotion
protected
T
activeMotion
Field activeMotion.
currentActiveMotion
final
T
currentActiveMotion
Field currentActiveMotion.
Method Detail
MotionSequence
Method MotionSequence.
- Parameters:
@Nonnull final BuilderMotionSequencebuilderfinal T[]steps
activate
public
void
activate
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method activate.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor
deactivate
public
void
deactivate
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method deactivate.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor
computeSteering
public
boolean
computeSteering
(@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final InfoProvider sensorInfo, final double dt, @Nonnull final Steering desiredSteering, @Nonnull final ComponentAccessor componentAccessor)
Method computeSteering.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nullable final InfoProvidersensorInfofinal doubledt@Nonnull final SteeringdesiredSteering@Nonnull final ComponentAccessorcomponentAccessor
motionControllerChanged
public
void
motionControllerChanged
(@Nullable final Ref ref, @Nonnull final NPCEntity npcComponent, final MotionController motionController, @Nullable final ComponentAccessor componentAccessor)
Method motionControllerChanged.
- Parameters:
@Nullable final Refref@Nonnull final NPCEntitynpcComponentfinal MotionControllermotionController@Nullable final ComponentAccessorcomponentAccessor
componentCount
public
int
componentCount
()
Method componentCount.
getComponent
Method getComponent.
- Parameters:
final intindex
restart
public
void
restart
()
Method restart.
doActivate
protected
void
doActivate
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method doActivate.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor
IndexOutOfBoundsException
public
new
IndexOutOfBoundsException
(String.format("Motion sequence index out of range (%s)
Method IndexOutOfBoundsException.
- Parameters:
String.format("Motion sequence index out of range(%s
size
public
than
size
(%s)
Method size.
- Parameters:
%s%s
activateNext
protected
void
activateNext
(@Nonnull final Ref ref, final int newIndex, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method activateNext.
- Parameters:
@Nonnull final Refreffinal intnewIndex@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor