Photon Fusion 2.0.4

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
NetworkBool Struct Reference

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

Inherits INetworkStruct, and IEquatable< NetworkBool >.

Public Member Functions

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

Static Public Member Functions

static implicit operator bool (NetworkBool val)
 Defines an implicit conversion of a NetworkBool to a bool. More...
 
static implicit operator NetworkBool (bool val)
 Defines an implicit conversion of a bool to a NetworkBool. More...
 

Public Attributes

int _value
 

Static Public Attributes

const int SIZE = 4
 The size of the NetworkBool structure in bytes. More...
 

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]

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 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 int GetHashCode ( )

Serves as the default hash function.

Returns
A hash code for the current NetworkBool.

◆ operator bool()

static implicit operator bool ( NetworkBool  val)
static

Defines an implicit conversion of a NetworkBool to a bool.

Parameters
valThe NetworkBool to convert.

◆ operator NetworkBool()

static implicit operator NetworkBool ( bool  val)
static

Defines an implicit conversion of a bool to a NetworkBool.

Parameters
valThe bool to convert.

◆ ToString()

override string ToString ( )

Returns a string that represents the current NetworkBool.

Returns
A string that represents the current NetworkBool.

Member Data Documentation

◆ SIZE

const int SIZE = 4
static

The size of the NetworkBool structure in bytes.