Photon Fusion 2.0.0

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

The NetworkBehaviourBufferInterpolator struct is used to interpolate between two NetworkBehaviourBuffer instances. This is a read-only, ref struct, meaning it cannot be boxed and it can only be used on the stack. More...

Public Member Functions

float Angle (NetworkBehaviour.PropertyReader< Angle > property)
 Gets the interpolated angle of a property.
 
float Angle (string property)
 Gets the interpolated angle of a property.
 
bool Bool (NetworkBehaviour.PropertyReader< bool > property)
 Gets the interpolated boolean value of a property.
 
bool Bool (string property)
 Gets the interpolated boolean value of a property.
 
float Float (NetworkBehaviour.PropertyReader< float > property)
 Gets the interpolated float value of a property.
 
float Float (string property)
 Gets the interpolated float value of a property.
 
int Int (NetworkBehaviour.PropertyReader< int > property)
 Gets the interpolated integer value of a property.
 
int Int (string property)
 Gets the interpolated integer value of a property.
 
 NetworkBehaviourBufferInterpolator (NetworkBehaviour nb)
 Constructor for the NetworkBehaviourBufferInterpolator struct.
 
Quaternion Quaternion (NetworkBehaviour.PropertyReader< Quaternion > property)
 Gets the interpolated Quaternion value of a property.
 
Quaternion Quaternion (string property)
 Gets the interpolated Quaternion value of a property.
 
Select< T > (NetworkBehaviour.PropertyReader< T > property)
 Selects the interpolated value of a property.
 
Select< T > (string property)
 Selects the interpolated value of a property by its name.
 
Vector2 Vector2 (NetworkBehaviour.PropertyReader< Vector2 > property)
 Gets the interpolated Vector2 value of a property.
 
Vector2 Vector2 (string property)
 Gets the interpolated Vector2 value of a property.
 
Vector3 Vector3 (NetworkBehaviour.PropertyReader< Vector3 > property)
 Gets the interpolated Vector3 value of a property.
 
Vector3 Vector3 (string property)
 Gets the interpolated Vector3 value of a property.
 
Vector4 Vector4 (NetworkBehaviour.PropertyReader< Vector4 > property)
 Gets the interpolated Vector4 value of a property.
 
Vector4 Vector4 (string property)
 Gets the interpolated Vector4 value of a property.
 

Static Public Member Functions

static implicit operator bool (NetworkBehaviourBufferInterpolator i)
 Implicit conversion operator to bool. This allows a NetworkBehaviourBufferInterpolator instance to be used in conditions directly.
 

Public Attributes

readonly float Alpha
 The interpolation factor, ranging from 0 to 1. This value is used to interpolate between the "from" and "to" states.
 
readonly NetworkBehaviour Behaviour
 The NetworkBehaviour instance that this interpolator is associated with.
 
readonly NetworkBehaviourBuffer From
 The NetworkBehaviourBuffer instance representing the "from" state for interpolation.
 
readonly NetworkBehaviourBuffer To
 The NetworkBehaviourBuffer instance representing the "to" state for interpolation.
 
readonly bool Valid
 A value indicating whether this interpolator is valid. An interpolator is considered valid if it has successfully retrieved the "from" and "to" buffers.
 

Detailed Description

The NetworkBehaviourBufferInterpolator struct is used to interpolate between two NetworkBehaviourBuffer instances. This is a read-only, ref struct, meaning it cannot be boxed and it can only be used on the stack.

Constructor & Destructor Documentation

◆ NetworkBehaviourBufferInterpolator()

Constructor for the NetworkBehaviourBufferInterpolator struct.

Parameters
nbThe NetworkBehaviour instance that this interpolator is associated with.

Member Function Documentation

◆ Angle() [1/2]

Gets the interpolated angle of a property.

Parameters
propertyThe PropertyReader for the property to get the angle of.
Returns
The interpolated angle of the property.

◆ Angle() [2/2]

float Angle ( string  property)

Gets the interpolated angle of a property.

Parameters
propertyThe name of the property to get the angle of.
Returns
The interpolated angle of the property.

◆ Bool() [1/2]

bool Bool ( NetworkBehaviour::PropertyReader< bool >  property)

Gets the interpolated boolean value of a property.

Parameters
propertyThe PropertyReader for the property to get the boolean value of.
Returns
The interpolated boolean value of the property.

◆ Bool() [2/2]

bool Bool ( string  property)

Gets the interpolated boolean value of a property.

Parameters
propertyThe name of the property to get the boolean value of.
Returns
The interpolated boolean value of the property.

◆ Float() [1/2]

float Float ( NetworkBehaviour::PropertyReader< float >  property)

Gets the interpolated float value of a property.

Parameters
propertyThe PropertyReader for the property to get the float value of.
Returns
The interpolated float value of the property.

◆ Float() [2/2]

float Float ( string  property)

Gets the interpolated float value of a property.

Parameters
propertyThe name of the property to get the float value of.
Returns
The interpolated float value of the property.

◆ Int() [1/2]

int Int ( NetworkBehaviour::PropertyReader< int >  property)

Gets the interpolated integer value of a property.

Parameters
propertyThe PropertyReader for the property to get the integer value of.
Returns
The interpolated integer value of the property.

◆ Int() [2/2]

int Int ( string  property)

Gets the interpolated integer value of a property.

Parameters
propertyThe name of the property to get the integer value of.
Returns
The interpolated integer value of the property.

◆ operator bool()

static implicit operator bool ( NetworkBehaviourBufferInterpolator  i)
static

Implicit conversion operator to bool. This allows a NetworkBehaviourBufferInterpolator instance to be used in conditions directly.

Parameters
iThe NetworkBehaviourBufferInterpolator instance to convert.
Returns
True if the interpolator is valid, false otherwise.

◆ Quaternion() [1/2]

Quaternion Quaternion ( NetworkBehaviour::PropertyReader< Quaternion >  property)

Gets the interpolated Quaternion value of a property.

Parameters
propertyThe PropertyReader for the property to get the Quaternion value of.
Returns
The interpolated Quaternion value of the property.

◆ Quaternion() [2/2]

Quaternion Quaternion ( string  property)

Gets the interpolated Quaternion value of a property.

Parameters
propertyThe name of the property to get the Quaternion value of.
Returns
The interpolated Quaternion value of the property.

◆ Select< T >() [1/2]

T Select< T > ( NetworkBehaviour::PropertyReader< T >  property)

Selects the interpolated value of a property.

Template Parameters
TThe type of the property to select. Must be unmanaged.
Parameters
propertyThe PropertyReader for the property to select.
Returns
The interpolated value of the property.
Type Constraints
T :unmanaged 

◆ Select< T >() [2/2]

T Select< T > ( string  property)

Selects the interpolated value of a property by its name.

Template Parameters
TThe type of the property to select. Must be unmanaged.
Parameters
propertyThe name of the property to select.
Returns
The interpolated value of the property.
Type Constraints
T :unmanaged 

◆ Vector2() [1/2]

Vector2 Vector2 ( NetworkBehaviour::PropertyReader< Vector2 >  property)

Gets the interpolated Vector2 value of a property.

Parameters
propertyThe PropertyReader for the property to get the Vector2 value of.
Returns
The interpolated Vector2 value of the property.

◆ Vector2() [2/2]

Vector2 Vector2 ( string  property)

Gets the interpolated Vector2 value of a property.

Parameters
propertyThe name of the property to get the Vector2 value of.
Returns
The interpolated Vector2 value of the property.

◆ Vector3() [1/2]

Vector3 Vector3 ( NetworkBehaviour::PropertyReader< Vector3 >  property)

Gets the interpolated Vector3 value of a property.

Parameters
propertyThe PropertyReader for the property to get the Vector3 value of.
Returns
The interpolated Vector3 value of the property.

◆ Vector3() [2/2]

Vector3 Vector3 ( string  property)

Gets the interpolated Vector3 value of a property.

Parameters
propertyThe name of the property to get the Vector3 value of.
Returns
The interpolated Vector3 value of the property.

◆ Vector4() [1/2]

Vector4 Vector4 ( NetworkBehaviour::PropertyReader< Vector4 >  property)

Gets the interpolated Vector4 value of a property.

Parameters
propertyThe PropertyReader for the property to get the Vector4 value of.
Returns
The interpolated Vector4 value of the property.

◆ Vector4() [2/2]

Vector4 Vector4 ( string  property)

Gets the interpolated Vector4 value of a property.

Parameters
propertyThe name of the property to get the Vector4 value of.
Returns
The interpolated Vector4 value of the property.