public interface IPlayerIdGenerator
Developers will be able to create their own implementation and plug it in any dynamic or static Room by providing a reference to their class name.
Modifier and Type | Method and Description |
---|---|
void |
freePlayerSlot(int playerId)
This method is called by the parent Room when a Player leaves the game and his player slot can be freed up.
|
Room |
getParentRoom()
Get a reference to the parent Room
|
int |
getPlayerSlot()
Return a new player slot/id
|
void |
init()
The init() method is invoked immediately after the successful creation of the Game Room.
|
void |
onRoomResize()
This method is invoked upon a Room size change.
|
void |
setParentRoom(Room room) |
void init()
getParentRoom()
int getPlayerSlot()
void freePlayerSlot(int playerId)
playerId
- the id that should be freed upvoid onRoomResize()
void setParentRoom(Room room)
Room getParentRoom()