Created
July 4, 2024 01:39
-
-
Save WolfgangSenff/24dcd2bb1ae2b14a2af7eccf5c8f8348 to your computer and use it in GitHub Desktop.
Kamatikos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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