Class Action

java.lang.Object
me.autobot.lib.systems.actions.Action

public class Action extends Object
An action that can be called and performed by the robot.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new Action.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    activate(Action action)
    Activates the given action to be executed and run to completion.
    void
    Cancels and effectively stops executing the action.
    void
    Executes the action.
    Returns the UUID of the action.
    boolean
    Returns whether the action has finished.
    void
    Called when the action is initialized.
    boolean
    Returns whether the action has been cancelled.
    static void
    Updates all actions.

    Methods inherited from class java.lang.Object

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

    • Action

      public Action()
      Creates a new Action.
  • Method Details

    • activate

      public static void activate(Action action)
      Activates the given action to be executed and run to completion.
      Parameters:
      action - The action to activate.
    • update

      public static void update()
      Updates all actions.
    • init

      public void init()
      Called when the action is initialized.
    • execute

      public void execute()
      Executes the action.
    • cancel

      public void cancel()
      Cancels and effectively stops executing the action.
    • hasFinished

      public boolean hasFinished()
      Returns whether the action has finished.
      Returns:
      Whether the action has finished.
    • isCancelled

      public boolean isCancelled()
      Returns whether the action has been cancelled.
      Returns:
      Whether the action has been cancelled.
    • getUUID

      public UUID getUUID()
      Returns the UUID of the action.
      Returns:
      The UUID of the action.