net.nexttext.behaviour.standard
Class Kill

java.lang.Object
  extended by net.nexttext.behaviour.AbstractAction
      extended by net.nexttext.behaviour.standard.Kill
All Implemented Interfaces:
Action

public class Kill
extends AbstractAction

The Kill action flags an object for removal from the Book, causing it to cease to exist completely.

Note that the object is not immediately removed for synchronization reasons. Rather, it will be eliminated at the end of the current frame.

Killing a TextObjectGroup will destroy all of its children as well.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
Kill()
           
 
Method Summary
 Action.ActionResult behave(TextObject to)
          Kills a TextObject.
 
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

Kill

public Kill()
Method Detail

behave

public Action.ActionResult behave(TextObject to)
Kills a TextObject.

See class comments for details on the exact time of death.

Specified by:
behave in interface Action
Overrides:
behave in class AbstractAction
Returns:
ActionResult will always be set as complete, although this is really a formality because apply Kill will cause an object to be removed from any Behaviour regardless.
Throws:
java.lang.NullPointerException - if the object has not been attached to a Book.