Show / Hide Table of Contents

Interface IGenericGameState

An interface used to implement IGameState using a class manager.

Inherited Members
IGameState.Get<T>(ObjectInfo, TimeSpan, CancellationToken)
IGameState.GetAll<T>(ObjectInfo, TimeSpan, CancellationToken)
IGameState.GetAll<T>(TimeSpan, CancellationToken)
IGameState.GetAll<T>(string, TimeSpan, CancellationToken)
IGameState.Existing<T>(ObjectInfo?)
IGameState.ExistingAll<T>(string)
IGameState.Clear(ObjectInfo?)
IGameState.ClearAll<T>(params string[])
IState<ObjectInfo, IGameObject>.Get(ObjectInfo, TimeSpan, CancellationToken)
IState<ObjectInfo, IGameObject>.Existing(ObjectInfo)
IState<ObjectInfo, IGameObject>.Clear(ObjectInfo)
IReadOnlyCollection<IGameObject>.Count
IEnumerable<IGameObject>.GetEnumerator()
IEventAggregator<IGameEventArgs>.RecentEvents
IEventAggregator<IGameEventArgs>.ClearEvents()
IEventPublisher<IGameEventArgs>.EventReceived
IHasUpdateTime.UpdateTime
IQueryResultConsumer<IGameObject>.MergeResult(in QueryResult)
Namespace: Microsoft.XboxStudios.GameStateTracker.Generic
Assembly: GameStateTracker.Generic.Abstractions.dll
Syntax
public interface IGenericGameState : IGameState, IState<ObjectInfo, IGameObject>, IReadOnlyCollection<IGameObject>, IEnumerable<IGameObject>, IEnumerable, IEventAggregator<IGameEventArgs>, IEventPublisher<IGameEventArgs>, IHasUpdateTime, IQueryResultConsumer<IGameObject>

Properties

View Source

ClassManager

Gets a class manager storing the set of properties to retrieve for game classes.

Declaration
IClassManager ClassManager { get; }
Property Value
Type Description
IClassManager

Methods

View Source

Existing<T>(string?)

Gets a cached game object which has the given name.

Declaration
T? Existing<T>(string? objectName = null) where T : class, IGameObject
Parameters
Type Name Description
string objectName

The object name to look for.

Returns
Type Description
T

A game object.

Type Parameters
Name Description
T

The game object type.

View Source

Get<T>(string?, TimeSpan, CancellationToken)

Retrieves a game object which has the given name.

Declaration
Task<T?> Get<T>(string? objectName, TimeSpan maxAge, CancellationToken token = default) where T : class, IGameObject
Parameters
Type Name Description
string objectName

The object name to look for.

TimeSpan maxAge

The maximum age of the object, if it exists in the cache.

CancellationToken token

The cancellation token.

Returns
Type Description
Task<T>

The game object.

Type Parameters
Name Description
T

The object type.

Extension Methods

IQueryResultConsumerExtensions.MergeResults<T>(IQueryResultConsumer<T>, IEnumerable<QueryResult>?)
IGameStateExtensions.GetLocalPlayerPawn<T>(IGameState, int, TimeSpan)
IGameStateExtensions.GetLocalPlayerState<T>(IGameState, int, TimeSpan)
IGameStateExtensions.GetLocalPlayer<T>(IGameState, int, TimeSpan)
IGameStateExtensions.GetPlayerLocation<T>(IGameState, int, TimeSpan)
IGameStateExtensions.LocalPlayer(IGameState, int)
IGameStateExtensions.LocalPlayerState(IGameState, int)
IGameStateExtensions.OrderByNearest<T>(IGameState, int, IEnumerable<T>)
IGameStateExtensions.PlayerDistanceTo(IGameState, int, IActor)
IGameStateExtensions.PlayerDistanceTo(IGameState, int, Vector3?)
IGameStateExtensions.PlayerLocation(IGameState, int)
IEnumerableExtensions.WithoutLast<T>(IEnumerable<T>)
  • View Source
In this article
Back to top Generated by DocFX