Interface ITickRateStateMachine<S extends IState>

All Superinterfaces:
IStateMachine<ITickingTransition<S>,S>
All Known Implementing Classes:
TickRateStateMachine

public interface ITickRateStateMachine<S extends IState> extends IStateMachine<ITickingTransition<S>,S>
  • Method Details

    • tick

      void tick()
      Tick the statemachine.
      Specified by:
      tick in interface IStateMachine<ITickingTransition<S extends IState>,S extends IState>
    • checkTransition

      boolean checkTransition(@NotNull @NotNull ITickingTransition<S> transition)
      Check the condition for a transition
      Specified by:
      checkTransition in interface IStateMachine<ITickingTransition<S extends IState>,S extends IState>
      Parameters:
      transition - the target to check
      Returns:
      true if this target worked and we should stop executing this tick
    • getTickRate

      int getTickRate()
      Returns the current rate the statemachine is beeing ticked at.
      Returns:
      the tickrate
    • setTickRate

      void setTickRate(int tickRate)
      Returns the current rate the statemachine is beeing ticked at.
      Parameters:
      tickRate - the tick rate to set.
    • setCurrentDelay

      void setCurrentDelay(int ticksToNext)
      Sets the delay to next execution for the currently executed transition
      Parameters:
      ticksToNext -