Time class
Class for representing a timer.
@author {@link https://github.com/Mugen87|Mugen87}
Constructors
- Time([void pageVisibilityHandler()?])
- Constructs a new time object.
Properties
- delta → double
-
Returns the delta time in seconds. Represents the completion time in seconds since
the last simulation step.
no setter
- elapsed → double
-
Returns the elapsed time in seconds. It's the accumulated
value of all previous time deltas.
no setter
- fixedDelta → double
-
Returns the fixed delta time in seconds.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- pageVisibilityHandler ↔ void Function()?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timescale → double
-
Returns the timescale value.
no setter
- usePageVisibilityAPI ↔ bool
-
getter/setter pair
Methods
-
disableFixedDelta(
) → Time - Disables the usage of a fixed delta value.
-
dispose(
) → Time - Frees all internal resources.
-
enableFixedDelta(
) → Time - Enables the usage of a fixed delta value. Can be useful for debugging and testing.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → Time - Resets this time object.
-
setFixedDelta(
double fixedDelta) → Time - Sets a fixed time delta value.
-
setTimescale(
double timescale) → Time - Sets a timescale value. This value represents the scale at which time passes. Can be used for slow down or accelerate the simulation.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
) → Time - Updates the internal state of this time object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited