net.nexttext.behaviour.physics
Class Explode

java.lang.Object
  extended by net.nexttext.behaviour.AbstractAction
      extended by net.nexttext.behaviour.physics.PhysicsAction
          extended by net.nexttext.behaviour.physics.Explode
All Implemented Interfaces:
Action

public class Explode
extends PhysicsAction

This action gives the object a one-time velocity push in a random direction.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
Explode()
          Default constructor.
Explode(float force)
           
Explode(float force, float angularForce)
           
 
Method Summary
 Action.ActionResult behave(TextObject to)
          Default behave method for single objects.
 
Methods inherited from class net.nexttext.behaviour.physics.PhysicsAction
applyAcceleration, applyAngularAcceleration, applyAngularForce, applyForce, getAngularVelocity, getMass, getRequiredProperties, getVelocity
 
Methods inherited from class net.nexttext.behaviour.AbstractAction
behave, behave, complete, getDisplayName, makeBehaviour, properties, setDisplayName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Explode

public Explode()
Default constructor. Force is equal to 3.


Explode

public Explode(float force)

Explode

public Explode(float force,
               float angularForce)
Method Detail

behave

public Action.ActionResult behave(TextObject to)
Description copied from class: AbstractAction
Default behave method for single objects.

This method does nothing; it should be overriden by subclasses if they wish to support actions on single objects.

Trying to call this method on an Action which doesn't override it will throw an UnsupportedActionException.

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