C# Класс Project290.Mathematics.tfloat

This is a Transitioning float, hence the name tfloat. This acts like a regualar floating point number, but you can call GoTo with the target value and duration in seconds to have the value linearly transition there in that amount of time. The value of the float is in the "Value" variable, and this can be read and reset at any time.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AtTarget ( ) : bool

Determines if the tfloat is at the target value.

GoTo ( float target ) : void

Goes to the specified target in exactly 1 second.

GoTo ( float target, float duration ) : void

Goes to the specified target in the specified amount of time.

GoTo ( float target, float duration, bool useRealTime ) : void

Goes to the specified target in the specified amount of time.

SetValue ( float value ) : void

Forces the value to be at the specified value.

Update ( ) : void

Updates this instance. This must be called every cycle or else the tfloat will not transition as expected.

tfloat ( float value ) : System

Initializes a new instance of the tfloat class.

Описание методов

AtTarget() публичный Метод

Determines if the tfloat is at the target value.
public AtTarget ( ) : bool
Результат bool

GoTo() публичный Метод

Goes to the specified target in exactly 1 second.
public GoTo ( float target ) : void
target float The target to change the tfloat to.
Результат void

GoTo() публичный Метод

Goes to the specified target in the specified amount of time.
public GoTo ( float target, float duration ) : void
target float The target to change this tfloat to.
duration float The amount of time, in seconds, to take in transitioning.
Результат void

GoTo() публичный Метод

Goes to the specified target in the specified amount of time.
public GoTo ( float target, float duration, bool useRealTime ) : void
target float The target to change this tfloat to.
duration float The amount of time, in seconds, to take in transitioning.
useRealTime bool if set to true [use real time].
Результат void

SetValue() публичный Метод

Forces the value to be at the specified value.
public SetValue ( float value ) : void
value float The value.
Результат void

Update() публичный Метод

Updates this instance. This must be called every cycle or else the tfloat will not transition as expected.
public Update ( ) : void
Результат void

tfloat() публичный Метод

Initializes a new instance of the tfloat class.
public tfloat ( float value ) : System
value float The value.
Результат System