|
||||||||||
| 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.Platform
A sidescroller platform that moves back and forth.
| Field Summary | |
static int |
DEFAULT_RATE
Default speed at which the platform travels |
protected int |
direction_
Direction of movement |
protected int |
interval_
|
protected SideScroller |
scroller_
|
protected java.util.ArrayList |
tempList_
|
protected SuspendableTimer |
timer_
Timer for movement |
| 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 | |
Platform()
|
|
| Method Summary | |
void |
bounce()
Change to a different direction. |
boolean |
canGoUp(GameMap map,
Point p)
Can we move up? |
void |
destroy()
Destroys the object. |
GameObject |
getBlocker(GameMap map,
int x,
int y)
Find any blocking object in this location |
GameObject |
getBlocker(GameMap map,
Point p)
Find any blocking object in this location |
void |
initialize()
Sets initial properties. |
java.util.List |
makeLocalCopy(java.util.List orig)
Make a local copy of a list. |
GameObject |
move()
Move a square forward. |
void |
moveOccupants(Point p,
Point dir)
Move anyone sitting on top, too. |
void |
setMap(GameMap map,
int x,
int y)
We've been put in a map. |
void |
start()
Start it up |
void |
stop()
Stop it |
void |
timerExpired()
Time to move. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_RATE
protected SuspendableTimer timer_
protected int direction_
protected SideScroller scroller_
protected int interval_
protected java.util.ArrayList tempList_
| Constructor Detail |
public Platform()
| Method Detail |
public void initialize()
initialize in interface GameObjectinitialize in class MapObject
public void setMap(GameMap map,
int x,
int y)
setMap in interface GameObjectsetMap in class MapObjectpublic void start()
public void stop()
public void timerExpired()
timerExpired in interface Timedpublic GameObject move()
public boolean canGoUp(GameMap map,
Point p)
map - the mapp - starting point (our reference location: left side)
public void moveOccupants(Point p,
Point dir)
dir - the direction we moved
public GameObject getBlocker(GameMap map,
int x,
int y)
map - the mapx - x-locy - y-loc
public GameObject getBlocker(GameMap map,
Point p)
map - the mapp - map locationpublic java.util.List makeLocalCopy(java.util.List orig)
public void bounce()
public void destroy()
destroy in interface GameObjectdestroy in class MapObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||