Show / Hide Table of Contents

Class GenericGameObject

A base class used to encapsulate a generic game object.

Inheritance
object
GenericGameObject
DataContractGameObject
FakeGameObject
UnityObject
UObject
Implements
IGameObject
INotifyPropertyChanged
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Microsoft.XboxStudios.GameStateTracker.Generic
Assembly: GameStateTracker.Generic.Abstractions.dll
Syntax
public class GenericGameObject : IGameObject, INotifyPropertyChanged

Constructors

View Source

GenericGameObject(IGameObject)

Initializes a new instance of the GenericGameObject class.

Declaration
public GenericGameObject(IGameObject gameObject)
Parameters
Type Name Description
IGameObject gameObject

The game object to encapsulate.

Properties

View Source

GameState

Gets or sets the game state associated with the game object.

Declaration
public IGameState? GameState { get; set; }
Property Value
Type Description
IGameState
View Source

Info

Gets the object's info.

Declaration
public ObjectInfo Info { get; }
Property Value
Type Description
ObjectInfo
View Source

this[string]

Gets the value of a property with the given name.

Declaration
public object? this[string key] { get; set; }
Parameters
Type Name Description
string key

The property name.

Property Value
Type Description
object

The property value, or null if no property was found.

View Source

Name

Gets the object's name.

Declaration
public virtual string Name { get; }
Property Value
Type Description
string
View Source

Properties

Gets a collection of property names for the game object.

Declaration
public IReadOnlyCollection<string> Properties { get; }
Property Value
Type Description
IReadOnlyCollection<string>

Methods

View Source

Equals(object?)

Determines whether the specified object is equal to the current object.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj

The object to compare with the current object.

Returns
Type Description
bool

true if the specified object is equal to the current object; otherwise, false.

Overrides
object.Equals(object)
View Source

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current object.

Overrides
object.GetHashCode()
View Source

OnGameObjectPropertyChanged(object?, PropertyChangedEventArgs)

Called when a property changes on the underlying game object.

Declaration
protected virtual void OnGameObjectPropertyChanged(object? sender, PropertyChangedEventArgs e)
Parameters
Type Name Description
object sender

The sender.

PropertyChangedEventArgs e

The property changed event args.

View Source

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object.

Overrides
object.ToString()

Events

View Source

PropertyChanged

Occurs when one of the game object's properties changes.

Declaration
public event PropertyChangedEventHandler? PropertyChanged
Event Type
Type Description
PropertyChangedEventHandler

Implements

IGameObject
INotifyPropertyChanged

Extension Methods

IGameObjectExtensions.ClassName(IGameObject)
IGameObjectExtensions.InfoEquals(IGameObject, IGameObject?)
IGameObjectExtensions.InfoEquals(IGameObject, in ObjectInfo)
IGameObjectExtensions.ObjectName(IGameObject)
IGameObjectExtensions.Matches(IGameObject, IClassManager, in ObjectInfo)
  • View Source
In this article
Back to top Generated by DocFX