|
||||||||||
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.standard.MoveTo
public class MoveTo
Move an object to the location.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action |
---|
Action.ActionResult |
Constructor Summary | |
---|---|
MoveTo(int x,
int y)
Move a TextObject to a specified position. |
|
MoveTo(int x,
int y,
long speed)
Move a TextObject to a specified position at a certain speed. |
|
MoveTo(Locatable target)
Move a TextObject to a target. |
|
MoveTo(Locatable target,
long speed)
Move a TextObject to a target at a certain speed. |
|
MoveTo(processing.core.PVector target)
Move a TextObject to a target. |
|
MoveTo(processing.core.PVector target,
long speed)
Move a TextObject to a specified position. |
Method Summary | |
---|---|
Action.ActionResult |
behave(TextObject to)
Add a vector to the position to bring it closer to the target. |
void |
setTarget(float x,
float y)
Sets a target to approach. |
void |
setTarget(float x,
float y,
float z)
Sets a target to approach. |
void |
setTarget(Locatable target)
Sets a target to approach. |
void |
setTarget(processing.core.PVector target)
Sets a target to approach. |
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 |
Methods inherited from interface net.nexttext.behaviour.Action |
---|
behave, behave, complete, getRequiredProperties |
Constructor Detail |
---|
public MoveTo(int x, int y)
x
- x target positiony
- y target positionpublic MoveTo(int x, int y, long speed)
x
- x target positiony
- x target positionspeed
- moving speedpublic MoveTo(Locatable target)
target
- locatable targetpublic MoveTo(Locatable target, long speed)
target
- locatable targetspeed
- The speed of the approach represented as the number of
pixels to move in each frame. Use a very large number for instant
travel.public MoveTo(processing.core.PVector target)
target
- locatable targetpublic MoveTo(processing.core.PVector target, long speed)
target
- position to move tospeed
- The speed of the approach represented as the number of
pixels to move in each frame. Use a very large number for instant
travel.Method Detail |
---|
public Action.ActionResult behave(TextObject to)
Result is complete if it has reached its target.
behave
in interface Action
behave
in class AbstractAction
public void setTarget(Locatable target)
setTarget
in interface TargetingAction
public void setTarget(float x, float y)
setTarget
in interface TargetingAction
public void setTarget(float x, float y, float z)
setTarget
in interface TargetingAction
public void setTarget(processing.core.PVector target)
setTarget
in interface TargetingAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |