Class ActionSequence<A extends Actor>

  • All Implemented Interfaces:
    Action<A>

    public final class ActionSequence<A extends Actor>
    extends java.lang.Object
    implements Action<A>
    Allows to configure actions that will be executed sequentially, one after another.
    • Constructor Summary

      Constructors 
      Constructor Description
      ActionSequence​(@NotNull Action<A>... actions)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(float deltaTime)
      Executes (one step of) the action.
      A getActor()  
      boolean isDone()  
      void reset()
      Resets the state of the action, except the assigned actor.
      void setActor​(A actor)
      Sets actor for the action
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActionSequence

        @SafeVarargs
        public ActionSequence​(@NotNull
                              @NotNull Action<A>... actions)
    • Method Detail

      • getActor

        @Nullable
        public A getActor()
        Specified by:
        getActor in interface Action<A extends Actor>
        Returns:
        actor that performs the action
      • setActor

        public void setActor​(@Nullable
                             A actor)
        Description copied from interface: Action
        Sets actor for the action
        Specified by:
        setActor in interface Action<A extends Actor>
        Parameters:
        actor - actor to be set for action
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface Action<A extends Actor>
        Returns:
        true if the action is done, false otherwise
      • execute

        public void execute​(float deltaTime)
        Description copied from interface: Action
        Executes (one step of) the action. Called by the scene this action was scheduled on, prior to rendering.
        Specified by:
        execute in interface Action<A extends Actor>
        Parameters:
        deltaTime - time passed from the previous execution
      • reset

        public void reset()
        Description copied from interface: Action
        Resets the state of the action, except the assigned actor.
        Specified by:
        reset in interface Action<A extends Actor>