|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwyvern.kernel.properties.PList
wyvern.kernel.maps.MapObject
wyvern.lib.classes.games.SideScroller.Sliding
Property to make a player slide to the left and right along ice.
| Field Summary | |
protected int |
currentDir_
|
protected int |
interval_
|
protected GameObject |
target_
|
protected Timer |
timer_
|
| Fields inherited from class wyvern.kernel.maps.MapObject |
IN_MAP_EDITOR, listenerList_ |
| Fields inherited from class wyvern.kernel.properties.PList |
readOnly_ |
| Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
| Constructor Summary | |
Sliding(GameObject target,
int dir,
int interval)
Make someone or something start moving. |
|
| Method Summary | |
protected boolean |
advance()
Advance them in the default direction |
void |
bounce()
Reverse direction |
int |
getDirection()
Returns the direction this object is facing. |
int |
getInterval()
|
GameObject |
getTarget()
|
void |
setDirection(int dir)
Reset the direction. |
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, wait, wait, wait |
| Field Detail |
protected int interval_
protected Timer timer_
protected GameObject target_
protected int currentDir_
| Constructor Detail |
public Sliding(GameObject target,
int dir,
int interval)
target - object to be movedinterval - how long between steps| Method Detail |
public GameObject getTarget()
public int getDirection()
GameObject
getDirection in interface GameObjectgetDirection in class MapObjectpublic void setDirection(int dir)
setDirection in interface GameObjectsetDirection in class MapObjectdir - the new dirpublic int getInterval()
public void setInterval(int interval)
public void start()
public void stop()
public void bounce()
public void timerExpired()
timerExpired in interface Timedprotected boolean advance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||