Photon Fusion 2.0.3

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

A tick is a 32-bit integer that represents a frame number. More...

Inherits IComparable< Tick >, and IEquatable< Tick >.

Classes

class  EqualityComparer
 Provides a mechanism for comparing two Tick objects for equality. More...
 
class  RelationalComparer
 Provides a mechanism for comparing two Tick objects. More...
 

Public Member Functions

int CompareTo (Tick other)
 Compares the current Tick with another Tick. More...
 
override bool Equals (object obj)
 Determines whether the specified object is equal to the current Tick. More...
 
bool Equals (Tick other)
 Determines whether the specified Tick is equal to the current Tick. More...
 
override int GetHashCode ()
 Serves as the default hash function. More...
 
Tick Next (int increment)
 Returns the next Tick, incremented by a specified value. More...
 
override string ToString ()
 String representation of the Tick. More...
 

Static Public Member Functions

static implicit operator bool (Tick value)
 Converts a Tick to a boolean. More...
 
static implicit operator int (Tick value)
 Converts a Tick to an integer. More...
 
static implicit operator Tick (int value)
 Converts an integer to a Tick. More...
 
static bool operator!= (Tick a, Tick b)
 Determines whether the first specified Tick is not equal to the second specified Tick. More...
 
static bool operator< (Tick a, Tick b)
 Determines whether the first specified Tick is less than the second specified Tick. More...
 
static bool operator<= (Tick a, Tick b)
 Determines whether the first specified Tick is less than or equal to the second specified Tick. More...
 
static bool operator== (Tick a, Tick b)
 Determines whether the first specified Tick is equal to the second specified Tick. More...
 
static bool operator> (Tick a, Tick b)
 Determines whether the first specified Tick is greater than the second specified Tick. More...
 
static bool operator>= (Tick a, Tick b)
 Determines whether the first specified Tick is greater than or equal to the second specified Tick. More...
 

Public Attributes

int Raw
 The raw value of the Tick. This represents a frame number. More...
 

Static Public Attributes

const int ALIGNMENT = 4
 The alignment of the Tick structure in bytes. More...
 
const int SIZE = 4
 The size of the Tick structure in bytes. More...
 

Detailed Description

A tick is a 32-bit integer that represents a frame number.

Member Function Documentation

◆ CompareTo()

int CompareTo ( Tick  other)

Compares the current Tick with another Tick.

Parameters
otherA Tick to compare with this Tick.
Returns
A value that indicates the relative order of the objects being compared.

◆ Equals() [1/2]

override bool Equals ( object  obj)

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

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

◆ Equals() [2/2]

bool Equals ( Tick  other)

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

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

◆ GetHashCode()

override int GetHashCode ( )

Serves as the default hash function.

Returns
A hash code for the current Tick.

◆ Next()

Tick Next ( int  increment)

Returns the next Tick, incremented by a specified value.

Parameters
incrementThe value to increment the Tick by.
Returns
A new Tick that represents the current Tick incremented by the specified value.

◆ operator bool()

static implicit operator bool ( Tick  value)
static

Converts a Tick to a boolean.

Parameters
valueThe Tick to convert.
Returns
true if the Tick's raw value is greater than 0; otherwise, false.

◆ operator int()

static implicit operator int ( Tick  value)
static

Converts a Tick to an integer.

Parameters
valueThe Tick to convert.
Returns
An integer that represents the raw value of the specified Tick.

◆ operator Tick()

static implicit operator Tick ( int  value)
static

Converts an integer to a Tick.

Parameters
valueThe integer to convert.
Returns
A Tick that represents the specified integer. If the integer is less than 0, the Tick's raw value is set to 0.

◆ operator!=()

static bool operator!= ( Tick  a,
Tick  b 
)
static

Determines whether the first specified Tick is not equal to the second specified Tick.

◆ operator<()

static bool operator< ( Tick  a,
Tick  b 
)
static

Determines whether the first specified Tick is less than the second specified Tick.

◆ operator<=()

static bool operator<= ( Tick  a,
Tick  b 
)
static

Determines whether the first specified Tick is less than or equal to the second specified Tick.

◆ operator==()

static bool operator== ( Tick  a,
Tick  b 
)
static

Determines whether the first specified Tick is equal to the second specified Tick.

◆ operator>()

static bool operator> ( Tick  a,
Tick  b 
)
static

Determines whether the first specified Tick is greater than the second specified Tick.

◆ operator>=()

static bool operator>= ( Tick  a,
Tick  b 
)
static

Determines whether the first specified Tick is greater than or equal to the second specified Tick.

◆ ToString()

override string ToString ( )

String representation of the Tick.

Member Data Documentation

◆ ALIGNMENT

const int ALIGNMENT = 4
static

The alignment of the Tick structure in bytes.

◆ Raw

int Raw

The raw value of the Tick. This represents a frame number.

◆ SIZE

const int SIZE = 4
static

The size of the Tick structure in bytes.