public class LobbyManager extends Object implements LobbyListener
| Constructor and Description |
|---|
LobbyManager()
Creates a new instance of
LobbyManager. |
| Modifier and Type | Method and Description |
|---|---|
void |
addLobbyListener(LobbyListener listener)
Adds a listener for lobby events.
|
void |
gameAdded(String game)
Notifies the manager that a game was added.
|
void |
gameRemoved(String game)
Notifies the manager that a game was removed.
|
void |
joinGame(String gameName,
String characterName)
This method is used to tell the server that the player wants to
join the given game as the given player.
|
void |
playerCountUpdated(int count)
Notifies the manager that the membership count of the lobby has
changed.
|
void |
playerCountUpdated(String game,
int count)
Notifies the manager that the membership count of some game has
changed.
|
void |
setCharacters(Collection<CharacterStats> characters)
Notifies the manager of the characters available for the player.
|
void |
setClient(com.sun.sgs.client.simple.SimpleClient simpleClient)
Sets the client that this class uses for all communication
with the game server.
|
public void setClient(com.sun.sgs.client.simple.SimpleClient simpleClient)
client - the clientpublic void addLobbyListener(LobbyListener listener)
listener - the listener to addpublic void joinGame(String gameName, String characterName)
gameName - the name of the game to joincharacterName - the name of the character to join aspublic void gameAdded(String game)
gameAdded in interface LobbyListenergame - the name of the gamepublic void gameRemoved(String game)
gameRemoved in interface LobbyListenergame - the name of the gamepublic void playerCountUpdated(int count)
playerCountUpdated in interface LobbyListenercount - the number of playerspublic void playerCountUpdated(String game, int count)
playerCountUpdated in interface LobbyListenergame - the name of the game where the count changedcount - the number of playerspublic void setCharacters(Collection<CharacterStats> characters)
setCharacters in interface LobbyListenercharacters - the characters available to playCopyright © 2013. All Rights Reserved.