public class CollectMonster extends MonsterCharacter implements Serializable
| Constructor and Description |
|---|
CollectMonster(AICharacterManager mgr)
Creates an instance of
CollectMonster using the
default identifier. |
CollectMonster(int id,
AICharacterManager mgr)
Creates an instance of
CollectMonster based on the
given identifier. |
| Modifier and Type | Method and Description |
|---|---|
LevelBoard.ActionResult |
collidedFrom(Character character)
Called when the given character collides with us.
|
boolean |
collidedInto(Character character)
Called when you collide with the character.
|
CharacterStats |
getStatistics()
Returns the statistics associated with this character.
|
void |
regenerate()
This has no affect on
CollectMonster since they have no
meaningful statistics. |
void |
run()
Called periodically, but this is always ignored, because this creature
never moves.
|
void |
sendMessage(String message)
Sends a text message to the character's manager.
|
getManager, notifyStatsChangedgetID, getNamepublic CollectMonster(AICharacterManager mgr)
CollectMonster using the
default identifier.mgr - our managerpublic CollectMonster(int id,
AICharacterManager mgr)
CollectMonster based on the
given identifier.id - the identifier for this monstermgr - our managerpublic CharacterStats getStatistics()
getStatistics in interface Characterpublic LevelBoard.ActionResult collidedFrom(Character character)
collidedFrom in interface Charactercharacter - the character that collided with usActionResult.SUCCESSpublic boolean collidedInto(Character character)
collidedInto in interface Charactercharacter - the character that we collided withfalsepublic void sendMessage(String message)
sendMessage in interface Charactermessage - the message to sendpublic void run()
run in class AICharacterpublic void regenerate()
CollectMonster since they have no
meaningful statistics.regenerate in class AICharacterCopyright © 2013. All Rights Reserved.