|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.properties.TerrainSpeed
Sets the terrain speed of the terrain under this object. Necessary for bridges, piers, and other objects that let you move at a speed different from the normal terrain speed.
This property will only work properly for immobile, 1x1 objects.
Constructor Summary | |
TerrainSpeed()
|
Method Summary | |
void |
clearTerrainSpeed()
Puts the old terrain speed back. |
java.lang.Object |
createClone()
Makes a clone of this object. |
void |
fixSpeed()
Sets the terrain speed (by cloning a new terrain, sometimes), and adds "can-walk" to the target object if appropriate. |
int |
getSpeed()
Returns the speed to use for the terrain beneath our target obj. |
void |
mapLoaded(MapLifecycleEvent event)
Invoked when a map is loaded. |
void |
mapResumed(MapLifecycleEvent event)
Invoked when a map is resumed. |
void |
mapSuspended(MapLifecycleEvent event)
Invoked when a map is suspended. |
void |
mapUnloaded(MapLifecycleEvent event)
Invoked when a map is unloaded. |
static void |
markCanWalk(GameObject target)
|
void |
notifyAdd(PropertyList list)
Notifies the property that it's being added. |
void |
notifyRemove(PropertyList list)
Notifies the property that it's being removed. |
void |
setSpeed(int speed)
Sets the speed to use for the terrain beneath our target obj. |
void |
setTerrainSpeed()
Replaces the terrain beneath us with some faster terrain. |
void |
targetEnteredMap(MapChangeEvent event)
Notification that the target object has entered a map. |
void |
targetLeftMap(MapChangeEvent event)
Notification that the target object has left its map. |
java.lang.String |
toString()
Prints debugging string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TerrainSpeed()
Method Detail |
public void notifyAdd(PropertyList list)
notifyAdd
in interface AddRemoveNotify
list
- the GameObject whose property list we're being
added topublic void notifyRemove(PropertyList list)
notifyRemove
in interface AddRemoveNotify
list
- the GameObject whose property list we're being
removed frompublic void targetEnteredMap(MapChangeEvent event)
targetEnteredMap
in interface MapChangeListener
public void targetLeftMap(MapChangeEvent event)
targetLeftMap
in interface MapChangeListener
public void mapLoaded(MapLifecycleEvent event)
mapLoaded
in interface MapLifecycleListener
public void mapUnloaded(MapLifecycleEvent event)
MapLifecycleListener
mapUnloaded
in interface MapLifecycleListener
public void mapSuspended(MapLifecycleEvent event)
MapLifecycleListener
mapSuspended
in interface MapLifecycleListener
public void mapResumed(MapLifecycleEvent event)
MapLifecycleListener
mapResumed
in interface MapLifecycleListener
public void setSpeed(int speed)
public int getSpeed()
public void fixSpeed()
public static void markCanWalk(GameObject target)
public void setTerrainSpeed()
public void clearTerrainSpeed()
public java.lang.String toString()
public java.lang.Object createClone()
createClone
in interface MutableProperty
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |