Skip to content

Instantly share code, notes, and snippets.

@WolfgangSenff
Created July 4, 2024 01:39
Show Gist options
  • Save WolfgangSenff/24dcd2bb1ae2b14a2af7eccf5c8f8348 to your computer and use it in GitHub Desktop.
Save WolfgangSenff/24dcd2bb1ae2b14a2af7eccf5c8f8348 to your computer and use it in GitHub Desktop.
Kamatikos
class_name DaisyChain
extends RefCounted
# Basic signal with early stop implementation
var _callables = []
func chain(callable: Callable) -> DaisyChain:
_callables.push_back(callable)
return self
func begin() -> Callable:
var callable
for c in _callables:
if c.call():
callable = c
break
return callable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment