mdomrach
(mdomrach)
1
How do we add the equivalent of multicast delegates in UEFN Verse? From what I can tell in Verse.digest there are
event<native><public>(t:type)<computes> := class(signalable(t), awaitable(t)):
listenable<public>(payload:type)<computes> := interface(awaitable(payload), subscribable(payload)):
signalable<public>(payload:type)<computes> := interface:
awaitable<public>(payload:type)<computes> := interface:
subscribable<public>(t:type)<computes> := interface:
but not finding multicast delegates actually implemented, i.e.
typename<native><public>(payload:type)<computes> := class(signalable(payload), subscribable(payload)):
mdomrach
(mdomrach)
2
Found answer in another post! Array of funcs should cover multicast delegate events as like
my_subscribable := class:
var Funs<private>:[]my_fun = array{}
Subscribe<public>(Fun:my_fun):void =
set Funs += array{Fun}
Dispatch<private>():void =
for (Fun:Funs):
Fun("Hello")
3 Likes