Appearance
Function: runIf()
ts
function runIf(cond, ...items): Gate;Runs the given systems only while cond is true: runIf(inState(Screen, 'playing'), chain(A, B), C). Order works as without it: a gated chain still runs in order, .after() still applies. Gates nest (all conditions must hold). Skipped systems don't read events, so they see them when they run again only if the events are still alive (two runs of the emitting phase).
Parameters
| Parameter | Type |
|---|---|
cond | Condition |
...items | Schedulable[] |