|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.properties.PList wyvern.kernel.maps.MapObject wyvern.lib.classes.DynamicObject
This class is used for game objects that players can pick up and put in their inventory. Most subclasses override basically every method here, so it's not really required that you use it (you can extend MapObject directly if you like).
Field Summary |
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 | |
DynamicObject()
|
Method Summary | |
void |
adjustHP(int adjust)
Adjusts the monster's hit points upwards or downwards. |
void |
computeHP()
Figures out what our HP should be based on weight and material. |
int |
getHP()
Returns the object's current hit points. |
int |
getMaxHP()
Returns the object's maximum hit points. |
void |
initialize()
Initializes the object's default properties. |
void |
kill(GameObject attacker)
Destroys the object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wyvern.lib.MethodHookable |
addMethodHook, removeMethodHook, runMethodHook |
Methods inherited from interface wyvern.lib.Broadcaster |
broadcast, broadcast, broadcast, broadcast, broadcast |
Constructor Detail |
public DynamicObject()
Method Detail |
public void initialize()
GameObject
initialize
in interface GameObject
initialize
in class MapObject
public void computeHP()
public int getHP()
getHP
in interface Damageable
public int getMaxHP()
getMaxHP
in interface Damageable
public void adjustHP(int adjust)
adjustHP
in interface Damageable
adjust
- a number (usually negative) to add to the monster's hppublic void kill(GameObject attacker)
kill
in interface Damageable
attacker
- the player/monster/iron-gate/whatever that
did the final blow. Can be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |