public class RodentMonster extends MonsterCharacter implements Serializable
MonsterCharacter that supports
behavior for a rodent. It scurries around, occasionally attacking, but
never doing substantial damage.| Constructor and Description |
|---|
RodentMonster(AICharacterManager mgr)
Creates an instance of
RodentMonster with the default
identifier. |
RodentMonster(int id,
AICharacterManager mgr)
Creates an instance of
RodentMonster. |
| Modifier and Type | Method and Description |
|---|---|
LevelBoard.ActionResult |
collidedFrom(Character character)
Called when a character collides into us.
|
boolean |
collidedInto(Character character)
Called when you collide with the character.
|
CharacterStats |
getStatistics()
Returns the statistics associated with this character.
|
void |
regenerate()
Re-generates the character by creating a new set of statistics.
|
void |
run()
There is a good chance that we'll move
|
void |
sendMessage(String message)
Sends a text message to the character's manager.
|
getManager, notifyStatsChangedgetID, getNamepublic RodentMonster(AICharacterManager mgr)
RodentMonster with the default
identifier.mgr - the managerpublic RodentMonster(int id,
AICharacterManager mgr)
RodentMonster.id - the rodent's identifiermgr - the managerpublic CharacterStats getStatistics()
getStatistics in interface Characterpublic LevelBoard.ActionResult collidedFrom(Character character)
collidedFrom in interface Charactercharacter - the character that hit usActionResult.FAILpublic boolean collidedInto(Character character)
collidedInto in interface Charactercharacter - the character we hitpublic void sendMessage(String message)
sendMessage in interface Charactermessage - the message to sendpublic void run()
run in class AICharacterpublic void regenerate()
regenerate in class AICharacterCopyright © 2013. All Rights Reserved.