Class GameItem
Base class for runtime instances in Game Foundation.
Namespace: UnityEngine.GameFoundation
Assembly: solution.dll
Syntax
public abstract class GameItem
Properties
Name | Description |
---|---|
definition | The dfinition of this GameItem instance. |
discarded | Determines if this GameItem instance has been
discarded (removed from Game Foundation).
GameItem instances being standard objets, they cannot
be destroyed and garbage collected while all their references are
not set to |
id | The unique identifier of this GameItem instance. |
Methods
Name | Description |
---|---|
AdjustStat(string, StatValue) | Adjusts the value of the StatDefinition by its given
|
AdjustStat(StatDefinition, StatValue) | Adjusts the stat by specified amount. |
AssertActive() | Throws a NullReferenceException if this GameItem is discarded. |
Equals(object) | Determines whether the specified object is equal to the current object. |
~GameItem() | in finalizer, remove gameItem from gameItem instance lookup |
GetHashCode() | Serves as the default hash function. |
GetStat(string) | Gets the value of the StatDefinition by its given
|
GetStat(StatDefinition) | Gets the value of the given |
HasStat(string) | Tells if this GameItem instance has a
StatDetail with the given
|
HasStat(StatDefinition) | Tells if this GameItem instance has a
StatDetail with the given
|
ResetStat(string) | Resets the stat to the default value of its given definition. |
ResetStat(StatDefinition) | Resets the stat to the default value of its given definition. |
SetStat(string, StatValue) | Sets the value of the StatDefinition by its given
|
SetStat(StatDefinition, StatValue) | Sets the value of the given |
Events
Name | Description |
---|---|
removed | Event triggered right after this GameItem is removed. |
statChanged | Event triggered when a stat is updated. |