|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.nexttext.behaviour.AbstractAction net.nexttext.behaviour.control.OnCollision
public class OnCollision
This control applies an Action when an object overlaps with another object.
Objects affected by a OnCollision action must be added to the SpatialList, otherwise the behave() method will catch an exception.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action |
---|
Action.ActionResult |
Constructor Summary | |
---|---|
OnCollision(Action action)
Creates an OnCollision which applies the specified Action to every object that are being collided with. |
Method Summary | |
---|---|
Action.ActionResult |
behave(TextObject to)
For each object this one is colliding with, apply the action to the pair of colliding objects. |
java.util.Map<java.lang.String,Property> |
getRequiredProperties()
The properties that this action requires on a TextObject. |
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 |
---|
public OnCollision(Action action)
Method Detail |
---|
public Action.ActionResult behave(TextObject to)
The results of the called actions are combined using the method outlined in ActionResult.
behave
in interface Action
behave
in class AbstractAction
public java.util.Map<java.lang.String,Property> getRequiredProperties()
AbstractAction
Right now this method always returns an empty map, since basic Actions should be restricted to use only the core set of TextObject properties.
If a subclass of Action requires a set of additional properties then it should override this method and return the appropriate Map containing the property objects.
This method is required by the Action
interface.
getRequiredProperties
in interface Action
getRequiredProperties
in class AbstractAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |