LoopPhase class final
A named stretch of the loop that systems are added to.
A name rather than an enum, for the reason GameAction is a name: a
genre has moments the engine cannot list, and
a plugin adds them with LoopRegistry.addPhase between the engine's.
A name is unique across both kinds — a step phase and a frame phase may
not share one, since a constraint names a phase without its kind.
Constructors
- LoopPhase.frame(String name)
-
A phase named
namethat runs once a displayed frame.const - LoopPhase.step(String name)
-
A phase named
namethat runs inside every fixed step.const
Properties
- current → LoopPhase
-
This phase under the name it has now: itself, unless it was made with
one of formerNames.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- kind → PhaseKind
-
Whether the phase runs inside the fixed step or once a frame.
final
- name → String
-
The phase's name, unique across both kinds: what a system, a constraint
and a data plugin name it by.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
byName(
String name) → LoopPhase? -
The value called
name, or null for a name this version does not know, which is what a file written by a later version can carry. -
currentName(
String name) → String -
The name
namehas now: itself, unless it is one of formerNames.
Constants
- animate → const LoopPhase
- Skinned poses, particles and anything else that moves between steps.
- audio → const LoopPhase
- Sounds started by what the steps did, and the listener moved.
- camera → const LoopPhase
- The camera placed for this frame.
- fields → const LoopPhase
- The world's fields: heat, water, wind, fire — whatever spreads through the world after the bodies have moved and before the rules read it.
-
formerNames
→ const Map<
String, String> - The names the engine's phases had before, to the names they have now.
-
framePhases
→ const List<
LoopPhase> - The engine's frame phases, in order.
- input → const LoopPhase
- Input for this step is in place: a tape has been applied or the devices read, and the latches are set.
- movers → const LoopPhase
- Doors, lifts and what else the level drives, before anything sweeps against them.
- physics → const LoopPhase
- The bodies, the broadphase and the overlaps.
- publish → const LoopPhase
- The step's outcome is read and published; nothing after this changes the world.
- render → const LoopPhase
- The frame drawn.
- rules → const LoopPhase
- The game's rules: damage, scoring, win and lose.
-
stepPhases
→ const List<
LoopPhase> - The engine's step phases, in order.
- ui → const LoopPhase
- The interface over it.
-
values
→ const List<
LoopPhase> - Every value this version names, in declaration order. A later version appends; nothing is removed or renamed within a major.