public class DemonMonster extends MonsterCharacter implements Serializable
MonsterCharacter that models
a demon creature that is strong, retaliatory, but only somewhat mobile.| Constructor and Description |
|---|
DemonMonster(AICharacterManager mgr)
Creates an instance of
DemonMonster using the default
identifier. |
DemonMonster(int id,
AICharacterManager mgr)
Creates an instance of
DemonMonster. |
| 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 this character's statistics.
|
void |
regenerate()
Re-generates the character by creating a new set of statistics.
|
void |
run()
Calls the character to make a move, which may result in moving or
attacking.
|
void |
sendMessage(String message)
Sends a message to this character.
|
getManager, notifyStatsChangedgetID, getNamepublic DemonMonster(AICharacterManager mgr)
DemonMonster using the default
identifier.mgr - this character's managerpublic DemonMonster(int id,
AICharacterManager mgr)
DemonMonster.id - the identifier for this charactermgr - this character's managerpublic CharacterStats getStatistics()
getStatistics in interface Characterpublic LevelBoard.ActionResult collidedFrom(Character character)
collidedFrom in interface Charactercharacter - the character that hit usActionResult.FALSEpublic boolean collidedInto(Character character)
collidedInto in interface Charactercharacter - the character we hit.public void sendMessage(String message)
sendMessage in interface Charactermessage - the messagepublic void run()
run in class AICharacterpublic void regenerate()
regenerate in class AICharacterCopyright © 2013. All Rights Reserved.