C# Class Artemis.Engine.TimeableObject

A TimeableObject is an object that maintains the time it has been alive for, and exposing methods that measure the current position on the timeline of the object's life (for example, AtFrame determines if the current number of elapsed frames the object has been alive for is equal to a given number of frames).
Inheritance: UpdatableObject
Datei anzeigen Open project: ArtemisEngine/Artemis-Engine

Public Properties

Property Type Description
UseHeavyInvocationLoadHandling bool

Private Properties

Property Type Description
InternalUpdate void
updateTime void
updateTime_Partial void

Public Methods

Method Description
After ( double time ) : bool

Returns true if the elapsed time is greater than the given time.

After ( int frame ) : bool

Returns true if the elapsed frame count is greater than the given frame.

AfterOrAt ( double time ) : bool

Returns true if the elapsed time is greater than or equal to the given time.

AfterOrAt ( int frame ) : bool

Returns true if the elapsed frame count is greater than or equal to the given frame.

At ( double time ) : bool

Returns true if the elapsed time is equal to the given time (with an error margin equal to ArtemisEngine.GameTimer.DeltaTime).

At ( int frame ) : bool

Returns true if the elapsed frame count is equal to the given frame.

AtIntervals ( double interval, double start, double end = Double.PositiveInfinity ) : bool

Returns true if the elapsed time is between the given start and end times, and is congruent to zero mod the given interval (with an error equal to ArtemisEngine.GameTimer.DeltaTime). If ET is the elapsed time, then this function is equivalent to saying (start <= ET && ET <= end) && (ET - start) % interval < ArtemisEngine.GameTimer.DeltaTime.

AtIntervals ( int interval, int start, int end = Int32.MaxValue ) : bool

Returns true if the elapsed frame count is between the given start and end frames, and is congruent to zero mod the given interval. If EF is the number of elapsed frames, then this function is equivalent to saying (start <= EF && EF <= end) && (EF - start) % interval == 0.

Before ( double time ) : bool

Returns true if the elapsed time is less than the given time.

Before ( int frame ) : bool

Returns true if the elapsed frame count is less than the given frame.

BeforeOrAt ( double time ) : bool

Returns true if the elapsed time is less than or equal to the given time.

BeforeOrAt ( int frame ) : bool

Returns true if the elapsed frame count is less than or equal to the given frame.

During ( double start, double end ) : bool

Returns true if the elapsed time is strictly between the given start and end times.

During ( int start, int end ) : bool

Returns true if the elapsed frame count is strictly between the given start and end frames.

DuringIntervals ( double interval, double start, double end = Double.PositiveInfinity ) : bool

Periodically alternates between being true for the given interval of time, and then false for the next interval of time, continuing indefinitely.

DuringIntervals ( int interval, int start, int end = Int32.MaxValue ) : bool

Periodically alternates between being true for the given interval of time, and then false for the next interval of time, continuing indefinitely.

DuringOrAt ( double start, double end ) : bool

Returns true if the elapsed time is between the given start and end times inclusive.

DuringOrAt ( int start, int end ) : bool

Returns true if the elapsed frame count is between the given start and end frames inclusive.

InvokeAfter ( System.Action action, double time ) : void

Invoke a given action after the given number of milliseconds have passed.

InvokeAfter ( System.Action action, int frames ) : void

Invoke a given action after the given number of frames have passed.

Outside ( double start, double end ) : bool

Returns true if the elapsed time is strictly outside the given start and end time interval.

Outside ( int start, int end ) : bool

Returns true if the elapsed frame count is strictly outside the given start and end frame interval.

OutsideOrAt ( double start, double end ) : bool

Returns true if the elapsed time is outside the given start and end time interval inclusive.

OutsideOrAt ( int start, int end ) : bool

Returns true if the elapsed frame count is outisde the given start and end frame interval inclusive.

ResetTime ( bool clearInvocations = false ) : void
TimeableObject ( ) : System

Private Methods

Method Description
InternalUpdate ( ) : void
updateTime ( ) : void
updateTime_Partial ( ) : void

Method Details

After() public method

Returns true if the elapsed time is greater than the given time.
public After ( double time ) : bool
time double
return bool

After() public method

Returns true if the elapsed frame count is greater than the given frame.
public After ( int frame ) : bool
frame int
return bool

AfterOrAt() public method

Returns true if the elapsed time is greater than or equal to the given time.
public AfterOrAt ( double time ) : bool
time double
return bool

AfterOrAt() public method

Returns true if the elapsed frame count is greater than or equal to the given frame.
public AfterOrAt ( int frame ) : bool
frame int
return bool

At() public method

Returns true if the elapsed time is equal to the given time (with an error margin equal to ArtemisEngine.GameTimer.DeltaTime).
public At ( double time ) : bool
time double
return bool

At() public method

Returns true if the elapsed frame count is equal to the given frame.
public At ( int frame ) : bool
frame int
return bool

AtIntervals() public method

Returns true if the elapsed time is between the given start and end times, and is congruent to zero mod the given interval (with an error equal to ArtemisEngine.GameTimer.DeltaTime). If ET is the elapsed time, then this function is equivalent to saying (start <= ET && ET <= end) && (ET - start) % interval < ArtemisEngine.GameTimer.DeltaTime.
public AtIntervals ( double interval, double start, double end = Double.PositiveInfinity ) : bool
interval double
start double
end double
return bool

AtIntervals() public method

Returns true if the elapsed frame count is between the given start and end frames, and is congruent to zero mod the given interval. If EF is the number of elapsed frames, then this function is equivalent to saying (start <= EF && EF <= end) && (EF - start) % interval == 0.
public AtIntervals ( int interval, int start, int end = Int32.MaxValue ) : bool
interval int
start int
end int
return bool

Before() public method

Returns true if the elapsed time is less than the given time.
public Before ( double time ) : bool
time double
return bool

Before() public method

Returns true if the elapsed frame count is less than the given frame.
public Before ( int frame ) : bool
frame int
return bool

BeforeOrAt() public method

Returns true if the elapsed time is less than or equal to the given time.
public BeforeOrAt ( double time ) : bool
time double
return bool

BeforeOrAt() public method

Returns true if the elapsed frame count is less than or equal to the given frame.
public BeforeOrAt ( int frame ) : bool
frame int
return bool

During() public method

Returns true if the elapsed time is strictly between the given start and end times.
public During ( double start, double end ) : bool
start double
end double
return bool

During() public method

Returns true if the elapsed frame count is strictly between the given start and end frames.
public During ( int start, int end ) : bool
start int
end int
return bool

DuringIntervals() public method

Periodically alternates between being true for the given interval of time, and then false for the next interval of time, continuing indefinitely.
public DuringIntervals ( double interval, double start, double end = Double.PositiveInfinity ) : bool
interval double
start double
end double
return bool

DuringIntervals() public method

Periodically alternates between being true for the given interval of time, and then false for the next interval of time, continuing indefinitely.
public DuringIntervals ( int interval, int start, int end = Int32.MaxValue ) : bool
interval int
start int
end int
return bool

DuringOrAt() public method

Returns true if the elapsed time is between the given start and end times inclusive.
public DuringOrAt ( double start, double end ) : bool
start double
end double
return bool

DuringOrAt() public method

Returns true if the elapsed frame count is between the given start and end frames inclusive.
public DuringOrAt ( int start, int end ) : bool
start int
end int
return bool

InvokeAfter() public method

Invoke a given action after the given number of milliseconds have passed.
public InvokeAfter ( System.Action action, double time ) : void
action System.Action
time double
return void

InvokeAfter() public method

Invoke a given action after the given number of frames have passed.
public InvokeAfter ( System.Action action, int frames ) : void
action System.Action
frames int
return void

Outside() public method

Returns true if the elapsed time is strictly outside the given start and end time interval.
public Outside ( double start, double end ) : bool
start double
end double
return bool

Outside() public method

Returns true if the elapsed frame count is strictly outside the given start and end frame interval.
public Outside ( int start, int end ) : bool
start int
end int
return bool

OutsideOrAt() public method

Returns true if the elapsed time is outside the given start and end time interval inclusive.
public OutsideOrAt ( double start, double end ) : bool
start double
end double
return bool

OutsideOrAt() public method

Returns true if the elapsed frame count is outisde the given start and end frame interval inclusive.
public OutsideOrAt ( int start, int end ) : bool
start int
end int
return bool

ResetTime() public method

public ResetTime ( bool clearInvocations = false ) : void
clearInvocations bool
return void

TimeableObject() public method

public TimeableObject ( ) : System
return System

Property Details

UseHeavyInvocationLoadHandling public_oe property

Whether or not this object can handle heavy loads of timed invocations. Set this to true if your object uses a very large number of timed invocations.
public bool UseHeavyInvocationLoadHandling
return bool