Class LocalNetworkRoom
This class represents the room where 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 by FromJoinMessage(IncomingMessage, LocalNetworkPlayer, RoomOptions) method only.
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 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 invisible, or changed to invisible.
MaxPlayers
Gets the limit of players for this room. This property is shown in lobby, too. If the room is full (players 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. Only updated while inside a Room.
Declaration
public IEnumerable<RemoteNetworkPlayer> RemotePlayers { get; }
Property Value
Type | Description |
---|---|
IEnumerable<RemoteNetworkPlayer> |
Events
PlayerJoined
Occurs when a remote player joined the room
Declaration
public event EventHandler<RemoteNetworkPlayer> PlayerJoined
Event Type
Type | Description |
---|---|
EventHandler<RemoteNetworkPlayer> |
PlayerJoining
Occurs when a remote player is joining the room
Declaration
public event EventHandler<RemoteNetworkPlayer> PlayerJoining
Event Type
Type | Description |
---|---|
EventHandler<RemoteNetworkPlayer> |
PlayerLeaving
Occurs when a remote player is leaving the room
Declaration
public event EventHandler<RemoteNetworkPlayer> PlayerLeaving
Event Type
Type | Description |
---|---|
EventHandler<RemoteNetworkPlayer> |
PlayerLeft
Occurs when a remote player left the room
Declaration
public event EventHandler<RemoteNetworkPlayer> PlayerLeft
Event Type
Type | Description |
---|---|
EventHandler<RemoteNetworkPlayer> |