acron.signals¶
Per-instance signals – the one piece of Godot’s signal API Acron lacks.
Godot code such as:
signal exploded()
...
robot.exploded.connect(_respawn_robot)
...
exploded.emit()
maps 1:1 onto Signal. Acron’s messenger is a global,
string-keyed bus: giving each instance its own exploded there would mean
mangling unique event names per object and losing the identity. A typed
Signal object is the per-instance capability itself, not a rename.
Godot’s Callable.bind(...) has no wrapper here on purpose: it is plain
argument binding – use a lambda or functools.partial at the call site
(note Godot appends bound args after the emit args; a lambda makes that
ordering explicit).
|
A named signal with Godot-like |