Class UnrealGameState
A class representing game state for Unreal Engine 4 or 5.
Inheritance
UnrealGameState
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Unreal
Assembly: GameStateTracker.Unreal.dll
Syntax
public class UnrealGameState : GenericGameState, IDisposable, IGenericGameState, IGameState, IState<ObjectInfo, IGameObject>, IReadOnlyCollection<IGameObject>, IEnumerable<IGameObject>, IEnumerable, IEventAggregator<IGameEventArgs>, IEventPublisher<IGameEventArgs>, IHasUpdateTime, IQueryResultConsumer<IGameObject>, IEventProcessor
Remarks
Initializes a new instance of the UnrealGameState class.
Constructors
View SourceUnrealGameState(IGenericGameObjectRepository, IClassManager?, ILogger<UnrealGameState>?, IGameObjectCache?)
A class representing game state for Unreal Engine 4 or 5.
Declaration
public UnrealGameState(IGenericGameObjectRepository repository, IClassManager? classManager = null, ILogger<UnrealGameState>? logger = null, IGameObjectCache? cache = null)
Parameters
Type | Name | Description |
---|---|---|
IGenericGameObjectRepository | repository | The generic object repository. |
IClassManager | classManager | The class manager. |
ILogger<UnrealGameState> | logger | The logger to use. |
IGameObjectCache | cache | The cache to use to store game objects. |
Remarks
Initializes a new instance of the UnrealGameState class.
Methods
View SourceAgeObject(ObjectInfo)
Gets the age of an object in the cache.
Declaration
protected override TimeSpan? AgeObject(ObjectInfo info)
Parameters
Type | Name | Description |
---|---|---|
ObjectInfo | info | The object info. |
Returns
Type | Description |
---|---|
TimeSpan? | The time since the object was last refreshed. |
Overrides
Remarks
When we query an object and check if it exists and how old it is in the cache, see if there's any matching object in the cache, even if the given query is slightly different.
Match(IGameObject, in ObjectInfo)
Determines if the game object matches the given query.
Declaration
protected override bool Match(IGameObject input, in ObjectInfo query)
Parameters
Type | Name | Description |
---|---|---|
IGameObject | input | The game object. |
ObjectInfo | query | The query. |
Returns
Type | Description |
---|---|
bool | True if the game object matches the given query. |