Documentation
¶
Overview ¶
Package sequence runs a list of timeline steps in order, with lifetime bound to an owner node. Steps are composed via Wait / Do / Parallel / Loop.
sequence.Run(p.AsNode(),
sequence.Do(func() { p.SetVisible(false) }),
sequence.Wait(0.4),
sequence.Do(func() { p.SetVisible(true) }),
sequence.Wait(0.4),
sequence.Do(func() { p.Free() }),
)
Runs on the engine's main thread via timing.After's Timer-node machinery — no goroutines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Step ¶
Step is one entry in a sequence. Construct with Wait, Do, WaitUntil, Parallel, or Loop.
func Do ¶
func Do(fn func()) Step
Do runs fn synchronously, then continues to the next step. Use for one-shot side effects between Waits — flashing, freeing, signal emits.
func Loop ¶
Loop repeats steps n times (or forever if n <= 0). Between iterations there's no implicit delay — chain a Wait inside steps if you want one.
func Parallel ¶
Parallel fans out to substeps simultaneously and continues to the next outer step once *every* substep has completed.
func Wait ¶
Wait inserts a delay of dt seconds. The next step runs after dt elapses (assuming owner is still in the tree).
func WaitUntil ¶
WaitUntil polls cond every frame and continues to the next step when it returns true. Cheap polling; for state-driven branching prefer github.com/AveryLucas/gogogd/fsm.