Class NetworkPlayerProvider
Provides the INetworkPlayer and its CustomProperties neccessary for NetworkPropertySync<K, V> components.
Inheritance
NetworkPlayerProvider
  Inherited Members
Namespace: Evergine.Networking.Components
Assembly: Evergine.Networking.dll
Syntax
public class NetworkPlayerProvider : NetworkCustomPropertiesProvider, IDependencyObject, IDisposable
  Constructors
NetworkPlayerProvider()
Initializes a new instance of the NetworkPlayerProvider class.
Declaration
public NetworkPlayerProvider()
  Properties
Player
Gets the target player.
Declaration
public INetworkPlayer Player { get; }
  Property Value
| Type | Description | 
|---|---|
| INetworkPlayer | 
PlayerId
Gets or sets the identifier of the target player. If set to -1 the target will be the local player.
Declaration
[RenderPropertyAsInput(MinLimit = -1, Tooltip = "The identifier of the target player. If set to -1 the target will be the local player")]
public int PlayerId { get; set; }
  Property Value
| Type | Description | 
|---|---|
| int | 
Methods
GetCustomProperties(MatchmakingClientService)
Gets the NetworkPropertiesTable instance.
Declaration
protected override NetworkPropertiesTable GetCustomProperties(MatchmakingClientService matchmakingClientService)
  Parameters
| Type | Name | Description | 
|---|---|---|
| MatchmakingClientService | matchmakingClientService | The MatchmakingClientService reference.  | 
      
Returns
| Type | Description | 
|---|---|
| NetworkPropertiesTable | The NetworkPropertiesTable instance.  | 
      
Overrides
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
  Returns
| Type | Description | 
|---|---|
| bool | True if all is OK.  | 
      
Overrides
Events
PlayerRefreshed
Occurs when the Player property is changed. Previous player is received as parameter.
Declaration
public event EventHandler<INetworkPlayer> PlayerRefreshed
  Event Type
| Type | Description | 
|---|---|
| EventHandler<INetworkPlayer> |