C# Класс 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).
Наследование: UpdatableObject
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
UseHeavyInvocationLoadHandling bool

Private Properties

Свойство Тип Описание
InternalUpdate void
updateTime void
updateTime_Partial void

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

Метод Описание
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

Приватные методы

Метод Описание
InternalUpdate ( ) : void
updateTime ( ) : void
updateTime_Partial ( ) : void

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

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

Returns true if the elapsed time is greater than the given time.
public After ( double time ) : bool
time double
Результат bool

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

Returns true if the elapsed frame count is greater than the given frame.
public After ( int frame ) : bool
frame int
Результат bool

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

Returns true if the elapsed time is greater than or equal to the given time.
public AfterOrAt ( double time ) : bool
time double
Результат bool

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

Returns true if the elapsed frame count is greater than or equal to the given frame.
public AfterOrAt ( int frame ) : bool
frame int
Результат bool

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

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
Результат bool

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

Returns true if the elapsed frame count is equal to the given frame.
public At ( int frame ) : bool
frame int
Результат bool

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

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
Результат bool

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

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
Результат bool

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

Returns true if the elapsed time is less than the given time.
public Before ( double time ) : bool
time double
Результат bool

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

Returns true if the elapsed frame count is less than the given frame.
public Before ( int frame ) : bool
frame int
Результат bool

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

Returns true if the elapsed time is less than or equal to the given time.
public BeforeOrAt ( double time ) : bool
time double
Результат bool

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

Returns true if the elapsed frame count is less than or equal to the given frame.
public BeforeOrAt ( int frame ) : bool
frame int
Результат bool

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

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
Результат bool

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

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
Результат bool

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

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
Результат bool

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

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
Результат bool

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

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
Результат bool

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

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
Результат bool

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

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
Результат void

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

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
Результат void

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

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
Результат bool

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

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
Результат bool

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

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
Результат bool

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

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
Результат bool

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

public ResetTime ( bool clearInvocations = false ) : void
clearInvocations bool
Результат void

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

public TimeableObject ( ) : System
Результат System

Описание свойств

UseHeavyInvocationLoadHandling публичное свойство

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
Результат bool