public abstract class BasicCharacterManager extends Object implements CharacterManager, Serializable
CharacterManager provides
some of the common functionality for all managers, and is extended by
the managers for players and AIs.| Modifier | Constructor and Description |
|---|---|
protected |
BasicCharacterManager(String uniqueID)
Creates an instance of
BasicCharacterManager. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compares another instance of
BasicCharacterManager
against this one for equality. |
Level |
getCurrentLevel()
Returns the current level where this manager is playing.
|
int |
getLevelXPos()
Returns the current character's x-coordinate.
|
int |
getLevelYPos()
Returns the current character's x-coordinate.
|
int |
hashCode()
Returns a hash code for this manager, which is calculated by getting
the hash code on the value from
toString. |
void |
setCurrentLevel(Level level)
Sets the current level.
|
void |
setLevelPosition(int x,
int y)
Sets the current character's position on the current level.
|
String |
toString()
Returns a unique representation of this manager.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitbroadcastUpdates, getCurrentCharacter, sendBoardprotected BasicCharacterManager(String uniqueID)
BasicCharacterManager.uniqueID - a unique identifier for this instancepublic Level getCurrentLevel()
getCurrentLevel in interface CharacterManagerpublic void setCurrentLevel(Level level)
setCurrentLevel in interface CharacterManagerlevelRef - a reference to a levelpublic void setLevelPosition(int x,
int y)
setLevelPosition in interface CharacterManagerx - the x-coordinatey - the y-coordinatepublic int getLevelXPos()
getLevelXPos in interface CharacterManagerpublic int getLevelYPos()
getLevelYPos in interface CharacterManagerpublic String toString()
public boolean equals(Object obj)
BasicCharacterManager
against this one for equality.Copyright © 2013. All Rights Reserved.