C# Class RoomInfo, storyspace

A simplified room with just the info required to list and join, used for the room listing in the lobby. The properties are not settable (open, maxPlayers, etc).
This class resembles info about available rooms, as sent by the Master server's lobby. Consider all values as readonly. None are synced (only updated by events by server).
Afficher le fichier Open project: personal-robots/storyspace Class Usage Examples

Protected Properties

Свойство Type Description
autoCleanUpField bool
maxPlayersField byte
nameField string
openField bool
visibleField bool

Méthodes publiques

Méthode Description
Equals ( object p ) : bool

Makes RoomInfo comparable (by name).

GetHashCode ( ) : int

Accompanies Equals, using the name's HashCode as return.

ToString ( ) : string

Simple printingin method.

Méthodes protégées

Méthode Description
CacheProperties ( Hashtable propertiesToCache ) : void

Copies "well known" properties to fields (isVisible, etc) and caches the custom properties (string-keys only) in a local hashtable.

RoomInfo ( string roomName, Hashtable properties ) : System

Constructs a RoomInfo to be used in room listings in lobby.

Method Details

CacheProperties() protected méthode

Copies "well known" properties to fields (isVisible, etc) and caches the custom properties (string-keys only) in a local hashtable.
protected CacheProperties ( Hashtable propertiesToCache ) : void
propertiesToCache Hashtable New or updated properties to store in this RoomInfo.
Résultat void

Equals() public méthode

Makes RoomInfo comparable (by name).
public Equals ( object p ) : bool
p object
Résultat bool

GetHashCode() public méthode

Accompanies Equals, using the name's HashCode as return.
public GetHashCode ( ) : int
Résultat int

RoomInfo() protected méthode

Constructs a RoomInfo to be used in room listings in lobby.
protected RoomInfo ( string roomName, Hashtable properties ) : System
roomName string
properties Hashtable
Résultat System

ToString() public méthode

Simple printingin method.
public ToString ( ) : string
Résultat string

Property Details

autoCleanUpField protected_oe property

Backing field for property. False unless the GameProperty is set to true (else it's not sent).
protected bool autoCleanUpField
Résultat bool

maxPlayersField protected_oe property

Backing field for property.
protected byte maxPlayersField
Résultat byte

nameField protected_oe property

Backing field for property.
protected string nameField
Résultat string

openField protected_oe property

Backing field for property.
protected bool openField
Résultat bool

visibleField protected_oe property

Backing field for property.
protected bool visibleField
Résultat bool