public interface CharacterManager
extends com.sun.sgs.app.ManagedObject
Character
instances. In essence, a Character represents a
single avitar in the game, but not the way that it's moved around
between elements of the world, the way in which it communicates
with its master (e.g., a player or some AI timing loop),
etc. Throughout the code, especially when we need to track
references, CharacterManagers are used to manage
Character interaction.| Modifier and Type | Method and Description |
|---|---|
void |
broadcastUpdates(Collection<BoardSpace> updates)
Sends space updates to the backing controller (eg, a player) of
this manager.
|
Character |
getCurrentCharacter()
Returns the current character being played through this manager.
|
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.
|
void |
sendBoard(Board board)
Sends the given board to the backing controller (eg, a player) of
this manager.
|
void |
setCurrentLevel(Level level)
Sets the current level.
|
void |
setLevelPosition(int x,
int y)
Sets the current character's position on the current level.
|
Character getCurrentCharacter()
Level getCurrentLevel()
void setCurrentLevel(Level level)
level - the current levelvoid setLevelPosition(int x,
int y)
x - the x-coordinatey - the y-coordinateint getLevelXPos()
int getLevelYPos()
void sendBoard(Board board)
board - the board to sendvoid broadcastUpdates(Collection<BoardSpace> updates)
updates - the updates to sendCopyright © 2013. All Rights Reserved.