Class APlayerInfoBase<TPawn>
A class representing an Unreal Engine APlayerState.
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Unreal
Assembly: GameStateTracker.Unreal.dll
Syntax
[GameClass("PlayerState")]
[GameProperty(new string[] { "PlayerName" })]
public class APlayerInfoBase<TPawn> : AActor, IGameObject, INotifyPropertyChanged, IActor, IObject where TPawn : APawn
Type Parameters
| Name | Description |
|---|---|
| TPawn | The pawn class type. |
Constructors
View SourceAPlayerInfoBase(IGameObject)
Initializes a new instance of the APlayerInfoBase<TPawn> class.
Declaration
protected APlayerInfoBase(IGameObject gameObject)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameObject | gameObject | The game object to encapsulate. |
Properties
View SourceLocation
Gets the player's cached location.
Declaration
public override Vector3? Location { get; }
Property Value
| Type | Description |
|---|---|
| Vector3? | A location vector. |
Overrides
View SourcePawn
Gets the player's controlled pawn.
Declaration
public TPawn? Pawn { get; }
Property Value
| Type | Description |
|---|---|
| TPawn |
PlayerName
Gets the player name.
Declaration
public string? PlayerName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceGetLocation(TimeSpan, CancellationToken)
Gets the player's location.
Declaration
public override Task<Vector3?> GetLocation(TimeSpan maxAge, CancellationToken token = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | maxAge | The maximum age of the object, if it exists in the cache. |
| CancellationToken | token | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<Vector3?> | A location vector. |
Overrides
View SourceGetPawn(TimeSpan, CancellationToken)
Gets the player's controlled pawn.
Declaration
public Task<TPawn?> GetPawn(TimeSpan maxAge, CancellationToken token = default)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | maxAge | The maximum age of the object, if it exists in the cache. |
| CancellationToken | token | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<TPawn> | A pawn object. |