Aego Русский

Actions

An action runs tweens and timers in order or together:

yield action.Sequence().
  Then(tween.Position(node, Vec2{4, 0}, 0.5, curve.OutCubic)).
  Wait(0.2).
  Then(tween.ToFloat(node, "SpriteRenderer.Tint.a", 0, 0.3, curve.Linear))
Function or method
action.Sequence(), action.Parallel() a new action; it starts at the next tween update
Then(tween), ThenTimer(timer), ThenAction(action), Wait(s) steps, added before the action starts
Stop(), Done(), Running() control and state
Completed(finished bool) signal when the action ends

A tween or timer passed to Then must be created in the same frame and belong to no other action; it waits for its turn. A step that ends early counts as done. Stop stops every unfinished step and ends the action with finished=false. An action is stopped when the node of the script that made it dies. A coroutine waits for an action with yield a; an action cannot wait for a coroutine.