Class LocalNetworkRoom
This class represents the room that the player has joined.
Inherited Members
Namespace: Evergine.Networking.Rooms
Assembly: Evergine.Networking.dll
Syntax
public class LocalNetworkRoom : BaseNetworkRoom, INetworkRoom, IRoomInfo
Constructors
LocalNetworkRoom(RoomOptions)
Initializes a new instance of the LocalNetworkRoom class. Used only by the FromJoinMessage(IncomingMessage, LocalNetworkPlayer, RoomOptions) method.
Declaration
protected LocalNetworkRoom(RoomOptions roomOptions)
Parameters
Type | Name | Description |
---|---|---|
RoomOptions | roomOptions | The room options for the new room. |
LocalNetworkRoom(RoomOptions, LocalNetworkPlayer)
Initializes a new instance of the LocalNetworkRoom class.
Declaration
public LocalNetworkRoom(RoomOptions roomOptions, LocalNetworkPlayer localPlayer)
Parameters
Type | Name | Description |
---|---|---|
RoomOptions | roomOptions | The room options for the new room. |
LocalNetworkPlayer | localPlayer | The client's local player. |
Properties
IsVisible
Gets a value indicating whether the room is listed in its lobby.
Declaration
public override bool IsVisible { get; set; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Remarks
Rooms can be created as invisible or changed to invisible.
MaxPlayers
Gets the limit of players for this room. This property is shown in the lobby, too. If the room is full (player count == maxplayers), joining this room will fail.
Declaration
public override byte MaxPlayers { get; set; }
Property Value
Type | Description |
---|---|
byte |
Overrides
Remarks
If the player has joined the room, the setter will update the server and all clients.
RemotePlayers
Gets the list of remote players who are also in that room. Updated only while inside a Room.
Declaration
public IEnumerable<RemoteNetworkPlayer> RemotePlayers { get; }
Property Value
Type | Description |
---|---|
IEnumerable<RemoteNetworkPlayer> |
Events
PlayerJoined
Occurs when a remote player joins the room
Declaration
public event EventHandler<RemoteNetworkPlayer> PlayerJoined
Event Type
Type | Description |
---|---|
EventHandler<RemoteNetworkPlayer> |
PlayerJoining
Occurs when a remote player joins the room
Declaration
public event EventHandler<RemoteNetworkPlayer> PlayerJoining
Event Type
Type | Description |
---|---|
EventHandler<RemoteNetworkPlayer> |
PlayerLeaving
Occurs when a remote player leaves the room
Declaration
public event EventHandler<RemoteNetworkPlayer> PlayerLeaving
Event Type
Type | Description |
---|---|
EventHandler<RemoteNetworkPlayer> |
PlayerLeft
Occurs when a remote player leaves the room
Declaration
public event EventHandler<RemoteNetworkPlayer> PlayerLeft
Event Type
Type | Description |
---|---|
EventHandler<RemoteNetworkPlayer> |