Struct PlayerId
Namespace: ReadyM.Api.Idents
Assembly: ReadyM.Api.dll
A unique identifier for a player in the current session. This is not a persistent identifier and can change over time, especially if players disconnect and reconnect. It should be used for identifying players during the current session, but not for long-term storage or cross-session identification.
public struct PlayerId : INetSerializable, IEquatable<PlayerId>
Implementsâ
INetSerializable, IEquatable<PlayerId>
Inherited Membersâ
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Propertiesâ
Invalidâ
An invalid PlayerId, which can be used to represent the absence of a player or an uninitialized state.
public static PlayerId Invalid { get; }
Property Valueâ
RawValueâ
public ushort RawValue { get; }
Property Valueâ
Serverâ
The PlayerId representing the server itself. This can be used to identify actions or messages that originate from the server rather than any specific player.
public static PlayerId Server { get; }
Property Valueâ
Methodsâ
Deserialize(NetDataReader)â
public void Deserialize(NetDataReader reader)
Parametersâ
reader NetDataReader
Equals(PlayerId)â
public bool Equals(PlayerId other)
Parametersâ
other PlayerId
Returnsâ
Equals(object?)â
public override bool Equals(object? obj)
Parametersâ
obj object?
Returnsâ
GetHashCode()â
public override int GetHashCode()
Returnsâ
Serialize(NetDataWriter)â
public void Serialize(NetDataWriter writer)
Parametersâ
writer NetDataWriter
ToString()â
public override string ToString()
Returnsâ
Operatorsâ
operator ==(PlayerId, PlayerId)â
public static bool operator ==(PlayerId left, PlayerId right)
Parametersâ
left PlayerId
right PlayerId
Returnsâ
operator !=(PlayerId, PlayerId)â
public static bool operator !=(PlayerId left, PlayerId right)
Parametersâ
left PlayerId
right PlayerId