Struct GameEntityRef
Lightweight reference to a gameplay entity, combining identity and semantic kind.
Passed across systems to identify participants without coupling to entity internals.
Assembly: Serenity.GameplayEntity.Domain.dll
Syntax
public readonly struct GameEntityRef : IEquatable<GameEntityRef>
Constructors
GameEntityRef(GameEntityId, GameEntityKind)
Creates a new GameEntityRef with the specified identity and kind.
Declaration
public GameEntityRef(GameEntityId id, GameEntityKind kind)
Parameters
Fields
Id
The unique identity of the referenced entity.
Declaration
public readonly GameEntityId Id
Field Value
Kind
The semantic kind of the referenced entity.
Declaration
public readonly GameEntityKind Kind
Field Value
Properties
IsValid
Checks if this reference has a valid entity identity.
Declaration
public bool IsValid { get; }
Property Value
Methods
Equals(GameEntityRef)
Declaration
public bool Equals(GameEntityRef other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(GameEntityRef, GameEntityRef)
Declaration
public static bool operator ==(GameEntityRef left, GameEntityRef right)
Parameters
Returns
operator !=(GameEntityRef, GameEntityRef)
Declaration
public static bool operator !=(GameEntityRef left, GameEntityRef right)
Parameters
Returns
Implements