Interface Action<A extends Actor>

    • Method Detail

      • getActor

        @Nullable
        A getActor()
        Returns:
        actor that performs the action
      • setActor

        void setActor​(@Nullable
                      A actor)
        Sets actor for the action
        Parameters:
        actor - actor to be set for action
      • isDone

        boolean isDone()
        Returns:
        true if the action is done, false otherwise
      • execute

        void execute​(float deltaTime)
        Executes (one step of) the action. Called by the scene this action was scheduled on, prior to rendering.
        Parameters:
        deltaTime - time passed from the previous execution
      • reset

        void reset()
        Resets the state of the action, except the assigned actor.
      • scheduleOn

        @NotNull
        default @NotNull Disposable scheduleOn​(@NotNull
                                               @NotNull Scene scene)
        A helper method that provides "fluent API" for registering the action on the scene.
        See Also:
        Scene.scheduleAction(Action)