|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.properties.FallingDown
Property to make a player "fall" towards the bottom of the screen... or some other direction.
Field Summary | |
protected int |
currentDir_
|
protected java.util.List |
dirs_
|
protected int |
distanceFallen_
|
protected int |
interval_
|
protected boolean |
jumping_
|
protected int |
size_
|
protected Point |
src_
|
protected GameObject |
target_
|
protected Timer |
timer_
|
Constructor Summary | |
FallingDown(GameObject target,
java.util.List directions,
int interval,
boolean jumping)
Make someone or something start moving. |
Method Summary | |
protected boolean |
advance()
Advance them in the default direction |
java.util.List |
getDirections()
|
int |
getInterval()
|
Point |
getSource()
|
GameObject |
getTarget()
|
void |
setDirections(java.util.List dirs)
|
void |
setInterval(int interval)
|
void |
start()
Starts them moving in the desired direction. |
void |
stop()
Stop falling. |
void |
timerExpired()
Time to move them |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Point src_
protected int interval_
protected Timer timer_
protected GameObject target_
protected java.util.List dirs_
protected int currentDir_
protected int size_
protected boolean jumping_
protected int distanceFallen_
Constructor Detail |
public FallingDown(GameObject target, java.util.List directions, int interval, boolean jumping)
target
- object to be moveddirections
- a list of directions to move. the last one keeps going until you hit something.interval
- how long between stepsMethod Detail |
public GameObject getTarget()
public Point getSource()
public java.util.List getDirections()
public void setDirections(java.util.List dirs)
public int getInterval()
public void setInterval(int interval)
public void start()
public void stop()
public void timerExpired()
timerExpired
in interface Timed
protected boolean advance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |