Class EventAction<T extends Event>

    • Field Summary

    • Constructor Summary

      Constructors 
      Constructor Description
      EventAction​(java.lang.Class<? extends T> eventClass)  
    • Constructor Detail

      • EventAction

        public EventAction​(java.lang.Class<? extends T> eventClass)
    • Method Detail

      • restart

        public void restart()
        Description copied from class: Action
        Sets the state of the action so it can be run again.
        Overrides:
        restart in class Action
      • setTarget

        public void setTarget​(Actor newTarget)
        Description copied from class: Action
        Sets the actor this action will manipulate. If no target actor is set, Action.setActor(Actor) will set the target actor when the action is added to an actor.
        Overrides:
        setTarget in class Action
      • handle

        public abstract boolean handle​(T event)
        Called when the specific type of event occurs on the actor.
        Returns:
        true if the event should be considered handled and this EventAction considered complete.
      • act

        public boolean act​(float delta)
        Description copied from class: Action
        Updates the action based on time. Typically this is called each frame by Actor.act(float).
        Specified by:
        act in class Action
        Parameters:
        delta - Time in seconds since the last frame.
        Returns:
        true if the action is done. This method may continue to be called after the action is done.
      • isActive

        public boolean isActive()
      • setActive

        public void setActive​(boolean active)