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.
파일 보기 프로젝트 열기: scastle/Solitude 1 사용 예제들

공개 메소드들

메소드 설명
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