Package | net.user1.reactor |
Class | public class RoomClassRegistry |
Inheritance | RoomClassRegistry ![]() |
Since : | Reactor 1.0.0 |
See also
Method | Defined By | ||
---|---|---|---|
RoomClassRegistry | |||
clearRoomClass(roomID:String):void
Removes the current custom class association for the specified roomID. | RoomClassRegistry | ||
getRoomClass(roomID:String):Class
Returns the current custom class association for the specified roomID. | RoomClassRegistry | ||
setRoomClass(roomID:String, roomClass:Class):void
Specifies the class that will be used to represent the room with the
specified roomID. | RoomClassRegistry |
RoomClassRegistry | () | Constructor |
public function RoomClassRegistry()
clearRoomClass | () | method |
public function clearRoomClass(roomID:String):void
Since : | Reactor 1.0.0 |
Removes the current custom class association for the specified roomID.
Parameters
roomID:String |
See also
getRoomClass | () | method |
public function getRoomClass(roomID:String):Class
Since : | Reactor 1.0.0 |
Returns the current custom class association for the specified roomID.
Parameters
roomID:String |
Class |
See also
setRoomClass | () | method |
public function setRoomClass(roomID:String, roomClass:Class):void
Since : | Reactor 1.0.0 |
Specifies the class that will be used to represent the room with the specified roomID. If the current client joins or observes the specified room, RoomManager will create an instance of the specified roomClass, and that instance will be returned by all RoomManager methods that provide access to the room. The specified roomClass must extend the built-in Room class.
Parameters
roomID:String | |
roomClass:Class |
See also
ChessRoom
as the class
for the room with the roomID "games.chess":
// Specify the room class var registry:RoomClassRegistry = reactor.getRoomManager().getRoomClassRegistry(); registry.setRoomClass("games.chess", ChessRoom); // Create the room object var chessRoom:ChessRoom = reactor.getRoomManager().createRoom("games.chess");