stick-the-quick/sequences/base/SequenceAgent.gd

15 lines
365 B
GDScript3
Raw Normal View History

class_name SequenceAgent extends Control
var sequence: Sequence
var args: Dictionary
func _ready() -> void:
var ui_args := UI.Args(self)
sequence = ui_args.sequence.new()
args = ui_args.sequence_args
_run.call_deferred()
func _run() -> void:
var sequence_result: Variant = await sequence._run(args)
Sequence.Return.call_deferred(sequence, sequence_result)