Class AControllerBase<TPlayerInfo, TPawn>
A class representing an Unreal Engine AController.
Inheritance
AControllerBase<TPlayerInfo, TPawn>
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Unreal
Assembly: GameStateTracker.Unreal.dll
Syntax
[GameClass("Controller")]
[GameProperty(new string[] { "Pawn", "PlayerState" })]
public class AControllerBase<TPlayerInfo, TPawn> : AActor, IGameObject, INotifyPropertyChanged, IActor, IObject, IController where TPlayerInfo : APlayerInfo where TPawn : APawn
Type Parameters
Name | Description |
---|---|
TPlayerInfo | The player info class type. |
TPawn | The pawn class type. |
Constructors
View SourceAControllerBase(IGameObject)
Initializes a new instance of the AControllerBase<TPlayerInfo, TPawn> class.
Declaration
protected AControllerBase(IGameObject gameObject)
Parameters
Type | Name | Description |
---|---|---|
IGameObject | gameObject | The game object to encapsulate. |
Properties
View SourcePawn
Gets the cached controlled pawn.
Declaration
public TPawn? Pawn { get; }
Property Value
Type | Description |
---|---|
TPawn |
PawnInfo
Gets the object info of the controlled pawn.
Declaration
protected ObjectInfo PawnInfo { get; }
Property Value
Type | Description |
---|---|
ObjectInfo |
PlayerState
Gets the cached player state.
Declaration
public TPlayerInfo? PlayerState { get; }
Property Value
Type | Description |
---|---|
TPlayerInfo |
PlayerStateInfo
Gets the object info of the associated player.
Declaration
protected ObjectInfo PlayerStateInfo { get; }
Property Value
Type | Description |
---|---|
ObjectInfo |
Methods
View SourceGetPawn(TimeSpan)
Gets the controlled pawn.
Declaration
public Task<TPawn?> GetPawn(TimeSpan maxAge)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | maxAge | The maximum age of the object, if it exists in the cache. |
Returns
Type | Description |
---|---|
Task<TPawn> | A pawn object. |
GetPlayerState(TimeSpan)
Gets the player state.
Declaration
public Task<TPlayerInfo?> GetPlayerState(TimeSpan maxAge)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | maxAge | The maximum age of the object, if it exists in the cache. |
Returns
Type | Description |
---|---|
Task<TPlayerInfo> | A player state object. |