Photon Fusion 2.1.1

NetworkBool Struct Reference

Represents a boolean value that can be networked. More...

Inherits INetworkStruct.

Public Member Functions

readonly bool Equals (bool b)
 Determines whether the specified bool is equal to the current NetworkBool.
readonly bool Equals (NetworkBool other)
 Determines whether the specified NetworkBool is equal to the current NetworkBool.
override readonly bool Equals (object obj)
 Determines whether the specified object is equal to the current NetworkBool.
override readonly int GetHashCode ()
 Serves as the default hash function.
 NetworkBool (bool value)
 Initializes a new instance of the NetworkBool struct with the specified value.
override readonly string ToString ()
 Returns a string that represents the current NetworkBool.

Static Public Member Functions

static implicit operator bool (NetworkBool val)
 Defines an implicit conversion of a NetworkBool to a bool.
static implicit operator NetworkBool (bool val)
 Defines an implicit conversion of a bool to a NetworkBool.
static bool operator!= (bool a, NetworkBool b)
static bool operator!= (NetworkBool a, bool b)
static bool operator== (bool a, NetworkBool b)
static bool operator== (NetworkBool a, bool b)

Public Attributes

int RawValue
 Internal value of the NetworkBool.

Detailed Description

Represents a boolean value that can be networked.

Constructor & Destructor Documentation

◆ NetworkBool()

NetworkBool ( bool value)

Initializes a new instance of the NetworkBool struct with the specified value.

Parameters
valueThe boolean value.

Member Function Documentation

◆ Equals() [1/2]

readonly bool Equals ( NetworkBool other)

Determines whether the specified NetworkBool is equal to the current NetworkBool.

Parameters
otherThe NetworkBool to compare with the current NetworkBool.
Returns
true if the specified NetworkBool is equal to the current NetworkBool; otherwise, false.

◆ Equals() [2/2]

override readonly bool Equals ( object obj)

Determines whether the specified object is equal to the current NetworkBool.

Parameters
objThe object to compare with the current NetworkBool.
Returns
true if the specified object is equal to the current NetworkBool; otherwise, false.

◆ GetHashCode()

override readonly int GetHashCode ( )

Serves as the default hash function.

Returns
A hash code for the current NetworkBool.

◆ operator bool()

implicit operator bool ( NetworkBool val)
static

Defines an implicit conversion of a NetworkBool to a bool.

Parameters
valThe NetworkBool to convert.

◆ operator NetworkBool()

implicit operator NetworkBool ( bool val)
static

Defines an implicit conversion of a bool to a NetworkBool.

Parameters
valThe bool to convert.

◆ ToString()

override readonly string ToString ( )

Returns a string that represents the current NetworkBool.

Returns
A string that represents the current NetworkBool.