Show / Hide Table of Contents

Class ManagedGameObjectBase

A base class used to represent a game object with a managed type.

Inheritance
object
ManagedGameObjectBase
ManagedGameObject
Implements
IGameObject
INotifyPropertyChanged
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Microsoft.XboxStudios.GameStateTracker
Assembly: GameStateTracker.Generic.Managed.dll
Syntax
public abstract class ManagedGameObjectBase : IGameObject, INotifyPropertyChanged
Remarks

Public fields and properties are automatically registered as game properties. However, these names are reserved for use by the IGameObject interface: GameState, Info, Item, and Properties.

Constructors

View Source

ManagedGameObjectBase(IGameObject)

Initializes a new instance of the ManagedGameObjectBase class.

Declaration
protected ManagedGameObjectBase(IGameObject gameObject)
Parameters
Type Name Description
IGameObject gameObject

The game object to clone.

View Source

ManagedGameObjectBase(in ObjectInfo)

Initializes a new instance of the ManagedGameObjectBase class.

Declaration
protected ManagedGameObjectBase(in ObjectInfo info)
Parameters
Type Name Description
ObjectInfo info

The game object info.

Properties

View Source

AdditionalData

Gets the additional data which couldn't be stored in managed properties.

Declaration
protected Dictionary<string, object?> AdditionalData { get; }
Property Value
Type Description
Dictionary<string, object>
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 all of the necessary information to identify the object.

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

this[string]

Gets or sets 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

Properties

Gets a collection of property names for the game object.

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

Methods

View Source

ConvertInstancePropertyValue(PropertyInfo, object?)

Converts a value to the correct type for the given property.

Declaration
protected virtual object? ConvertInstancePropertyValue(PropertyInfo prop, object? value)
Parameters
Type Name Description
PropertyInfo prop

The property info.

object value

The property value.

Returns
Type Description
object

The converted value.

View Source

GetInstanceProperty(string)

Gets the property info the given game class property.

Declaration
protected virtual PropertyInfo? GetInstanceProperty(string key)
Parameters
Type Name Description
string key

The property name.

Returns
Type Description
PropertyInfo

The property info.

View Source

SetInstanceProperty(string, object?)

Sets the value of the given game class property.

Declaration
protected void SetInstanceProperty(string key, object? value)
Parameters
Type Name Description
string key

The property name.

object value

The property value.

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 a property value 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