net.nexttext.behaviour.control
Class Delay

java.lang.Object
  extended by net.nexttext.behaviour.AbstractAction
      extended by net.nexttext.behaviour.control.Delay
All Implemented Interfaces:
Action

public class Delay
extends AbstractAction

Delays a given action for a number of seconds.

See Also:
Timer

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
Delay(Action action, float duration)
          Creates a Delay for the given action.
 
Method Summary
 Action.ActionResult behave(TextObject to)
          Applies the delay.
 
Methods inherited from class net.nexttext.behaviour.AbstractAction
behave, behave, complete, getDisplayName, getRequiredProperties, makeBehaviour, properties, setDisplayName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Delay

public Delay(Action action,
             float duration)
Creates a Delay for the given action.

Parameters:
duration - In seconds
Method Detail

behave

public Action.ActionResult behave(TextObject to)
Applies the delay.

During the delay the ActionResult will set neither event nor complete. Once the delay is complete, the result of the delayed Action will be returned.

Specified by:
behave in interface Action
Overrides:
behave in class AbstractAction