Multiplayer Reference
Class BasePlayer
Namespace: PlayerIO.GameLibrary
Language: C# / .NET
The base class you inherit from for your Player class.
Properties | |||
---|---|---|---|
public Achievements |
The Achievements object of the connected player |
||
public IConnection |
For internal usage |
||
public string |
The UserId that was originally used when the client called PlayerIO.Connect(...) |
||
public GameRequests |
The GameRequests object of the connected player |
||
public int |
Every time a client connects, an Id is assigned that uniquely identifies them in the room as long as they remain connected. |
||
public IPAddress |
The ip address the player is connected from |
||
public Dictionary<string, string> |
The data supplied by the client when the room was joined. That is, when the JoinRoom(...) or CreateJoinRoom(...) methods were called. |
||
public Leaderboards |
The Leaderboards object of the connected player |
||
public Notifications |
The Notifications object of the connected player |
||
public PartnerPay |
The PartnerPay object of the connected player |
||
public PayVault |
The PayVault vault of the connected player |
||
public PlayerInsight |
The PlayerInsight object of the connected player |
||
public DatabaseObject |
The PlayerObject of the connected player in the "PlayerObjects" BigDB table. |
||
public PublishingNetwork |
The PlayerIO Publishing Network object of the connected player |
||
public Yahoo |
DEPRECATED |
||
Methods | |||
public void |
Disconnects the client from the room. |
||
public virtual Dictionary<string, string> |
Override this method to provide custom debug data for the playerlist in the development server. |
||
public void |
Gets the PlayerObject (from the BigDB PlayerObjects table) for the connected player. The object is loaded from BigDB on first load, then reused for subsequent GetPlayerObject requests, which means that subsequent calls to GetPlayerObjects will call the callback instantly. |
||
public void |
Reloads the PlayerObject from the BigDB PlayerObjects table |
||
public void |
Send a message to the connected client without first having to construct a Message object. |
||
public void |
Send a message to the connected client |
BasePlayer.Achievements
public Achievements |
|
The Achievements object of the connected player
BasePlayer.Connection
public IConnection |
|
For internal usage
BasePlayer.ConnectUserId
public string |
|
The UserId that was originally used when the client called PlayerIO.Connect(...)
BasePlayer.GameRequests
public GameRequests |
|
The GameRequests object of the connected player
BasePlayer.Id
public int |
|
Every time a client connects, an Id is assigned that uniquely identifies them in the room as long as they remain connected.
BasePlayer.IPAddress
public IPAddress |
|
The ip address the player is connected from
BasePlayer.JoinData
public Dictionary<string, string> |
|
The data supplied by the client when the room was joined. That is, when the JoinRoom(...) or CreateJoinRoom(...) methods were called.
BasePlayer.Leaderboards
public Leaderboards |
|
The Leaderboards object of the connected player
BasePlayer.Notifications
public Notifications |
|
The Notifications object of the connected player
BasePlayer.PartnerPay
public PartnerPay |
|
The PartnerPay object of the connected player
BasePlayer.PayVault
public PayVault |
|
The PayVault vault of the connected player
BasePlayer.PlayerInsight
public PlayerInsight |
|
The PlayerInsight object of the connected player
BasePlayer.PlayerObject
public DatabaseObject |
|
The PlayerObject of the connected player in the "PlayerObjects" BigDB table.
This object is loaded via the GetPlayerObject() method or automatically when a player joins the game if the Game.PreloadPlayerObjects property is set to true.
BasePlayer.PublishingNetwork
public PublishingNetwork |
|
The PlayerIO Publishing Network object of the connected player
BasePlayer.Yahoo
public Yahoo |
|
DEPRECATED
BasePlayer.Disconnect
public void |
|
Disconnects the client from the room.
BasePlayer.GetDebugValues
public virtual Dictionary<string, string> |
|
Override this method to provide custom debug data for the playerlist in the development server.
Example
This is how you'd override the method and provide two values for each player, that will show up in the development server.
BasePlayer.GetPlayerObject
public void |
|
Gets the PlayerObject (from the BigDB PlayerObjects table) for the connected player. The object is loaded from BigDB on first load, then reused for subsequent GetPlayerObject requests, which means that subsequent calls to GetPlayerObjects will call the callback instantly.
Arguments
Callback<DatabaseObject> | callback |
A callback that will be called with the loaded PlayerObject |
BasePlayer.RefreshPlayerObject
public void |
|
Reloads the PlayerObject from the BigDB PlayerObjects table
Arguments
Callback | callback |
A callback that will be called when the new playerobject is loaded. |
BasePlayer.Send
public void |
|
Send a message to the connected client without first having to construct a Message object.
Arguments
string | type |
The type of message to send | |
params object[] | parameters |
The data to put in the message to send |
BasePlayer.Send
public void |
|
Send a message to the connected client
Arguments
Message | message |
The message to send |