Represents a Fusion player. More...
Inherits INetworkStruct.
Public Member Functions | |
override bool | Equals (object obj) |
override int | GetHashCode () |
override string | ToString () |
Static Public Member Functions | |
static implicit | operator bool (PlayerRef value) |
static implicit | operator int (PlayerRef value) |
static implicit | operator PlayerRef (int value) |
static bool | operator!= (PlayerRef a, PlayerRef b) |
static bool | operator== (PlayerRef a, PlayerRef b) |
static unsafe PlayerRef | Read (NetBitBuffer *buffer) |
static unsafe void | Write (NetBitBuffer *buffer, PlayerRef playerRef) |
static unsafe void | Write< T > (T *buffer, PlayerRef playerRef) |
Public Attributes | |
int | _index |
Static Public Attributes | |
const int | SIZE = 4 |
Properties | |
bool | IsNone [get] |
bool | IsValid [get] |
If this player index is valid More... | |
static PlayerRef | None [get] |
None player More... | |
int | PlayerId [get] |
Player id this player ref represents More... | |
int | RawEncoded [get] |
Raw encoded value More... | |
Represents a Fusion player.
The PlayerRef, in contrast to the player index, is 1-based. The reason is that default(PlayerRef) will return a "null/invalid" player ref struct for convenience. There are automatic cast operators that can cast an int into a PlayerRef.
|
get |
If this player index is valid
|
staticget |
None player
|
get |
Player id this player ref represents
|
get |
Raw encoded value