|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.classes.Corpse.CorpseState
Uses the State pattern to represent the state of the corpse, and handle state transitions.
Field Summary | |
static Corpse.CorpseState |
FRESH
|
static Corpse.CorpseState |
PUTRID
|
static Corpse.CorpseState |
RANCID
|
static Corpse.CorpseState |
SMELLY
|
Method Summary | |
void |
addCorpseDescriptionPrefix(Corpse corpse)
Optionally adds a prefix to the corpse description, such as "smelly". |
abstract java.lang.String |
getPrefix()
Returns the prefix to add to the corpse description. |
void |
removeCorpseDescriptionPrefix(Corpse corpse)
Removes the corpse-description prefix we added for this state, if any. |
abstract void |
transitionState(Corpse corpse)
Each CorpseState knows what to do when the timer expires for the current state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Corpse.CorpseState FRESH
public static final Corpse.CorpseState SMELLY
public static final Corpse.CorpseState RANCID
public static final Corpse.CorpseState PUTRID
Method Detail |
public abstract void transitionState(Corpse corpse)
public abstract java.lang.String getPrefix()
public void addCorpseDescriptionPrefix(Corpse corpse)
public void removeCorpseDescriptionPrefix(Corpse corpse)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |