public class ActionRandom extends ActionBase
Class ActionRandom. Provides actionrandom functionality for the Hytale server.
java.lang.Object > ActionBase > ActionRandom
Field Summary
availableActionsCount
protected
int
availableActionsCount
Field availableActionsCount.
totalWeight
protected
double
totalWeight
Field totalWeight.
current
protected
WeightedAction
current
Field current.
length
final
int
length
Field length.
finished
final
boolean
finished
Field finished.
Method Detail
ActionRandom
public
public
ActionRandom
(@Nonnull final BuilderActionRandom builder, @Nonnull final BuilderSupport support)
Method ActionRandom.
- Parameters:
@Nonnull final BuilderActionRandombuilder@Nonnull final BuilderSupportsupport
canExecute
public
boolean
canExecute
(@Nonnull final Ref ref, @Nonnull final Role role, final InfoProvider sensorInfo, final double dt, @Nonnull final Store store)
Method canExecute.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerolefinal InfoProvidersensorInfofinal doubledt@Nonnull final Storestore
execute
public
boolean
execute
(@Nonnull final Ref ref, @Nonnull final Role role, final InfoProvider sensorInfo, final double dt, @Nonnull final Store store)
Method execute.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerolefinal InfoProvidersensorInfofinal doubledt@Nonnull final Storestore
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