Class AITarget<S extends IState>

All Implemented Interfaces:
ITickingTransition<S>, IStateMachineTransition<S>

public class AITarget<S extends IState> extends TickingTransition<S>
A simple target the AI tries to accomplish. It has a state matcher, so it only gets executed on matching state. It has a tester function to make more checks to tell if execution is wanted. And it can change state.
  • Constructor Details

    • AITarget

      public AITarget(@NotNull S state, @NotNull @NotNull IBooleanConditionSupplier predicate, @NotNull @NotNull IStateSupplier<S> action, int tickRate)
      Construct a target.
      Parameters:
      state - the state it needs to be
      predicate - the predicate for execution
      action - the action to apply
      tickRate - the tick rate.
    • AITarget

      protected AITarget(@NotNull @NotNull IBooleanConditionSupplier predicate, @NotNull @NotNull IStateSupplier<S> action, int tickRate)
      Construct a target.
      Parameters:
      predicate - the predicate for execution
      action - the action to apply
      tickRate - the tick rate.
    • AITarget

      public AITarget(@NotNull S predicateState, @Nullable S state, int tickRate)
      Construct a target.
      Parameters:
      predicateState - the state it needs to be | null
      state - the state to switch to
      tickRate - the tick rate.
    • AITarget

      public AITarget(@NotNull S state, @NotNull @NotNull IStateSupplier<S> action, int tickRate)
      Construct a target.
      Parameters:
      state - the state it needs to be | null
      action - the action to apply
      tickRate - the tick rate.