C# Class 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.
Afficher le fichier Open project: scastle/Solitude Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

AtTarget() public méthode

Determines if the tfloat is at the target value.
public AtTarget ( ) : bool
Résultat bool

GoTo() public méthode

Goes to the specified target in exactly 1 second.
public GoTo ( float target ) : void
target float The target to change the tfloat to.
Résultat void

GoTo() public méthode

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.
Résultat void

GoTo() public méthode

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].
Résultat void

SetValue() public méthode

Forces the value to be at the specified value.
public SetValue ( float value ) : void
value float The value.
Résultat void

Update() public méthode

Updates this instance. This must be called every cycle or else the tfloat will not transition as expected.
public Update ( ) : void
Résultat void

tfloat() public méthode

Initializes a new instance of the tfloat class.
public tfloat ( float value ) : System
value float The value.
Résultat System