public static void NodeSubscribe <T>(this Behaviour behaviour, JNode node, JNodeEvent eventFilter, Action <T> action, bool alwaysActive = false) where T : JNode { behaviour.NodeSubscribe(node, eventFilter, n => { if (n is T jNode) { action(jNode); } }, alwaysActive); }
public static void NodeSubscribe <T>(this IService service, JNode node, JNodeEvent eventFilter, Action <T> action) where T : JNode { service.NodeSubscribe(node, eventFilter, n => { if (n is T jNode) { action(jNode); } }); }
public static void NodeSubscribe(this IService service, JNode node, JNodeEvent eventFilter, Action <JNode> action) { var linkHandler = new ObjectLinkHandler <IService>(service); node.Subscribe(linkHandler, (n, e) => { if (e == eventFilter) { action(n); } }); }
public static void NodeSubscribe(this State state, JNode node, JNodeEvent eventFilter, Action <JNode> action) { var linkHandler = new StateLinkHandler(state); node.Subscribe(linkHandler, (n, e) => { if (e == eventFilter) { action(n); } }); }
public static void NodeSubscribe(this Behaviour behaviour, JNode node, JNodeEvent eventFilter, Action <JNode> action, bool alwaysActive = false) { var linkHandler = new BehaviourLinkHandler(behaviour, alwaysActive); node.Subscribe(linkHandler, (n, e) => { if (e == eventFilter) { action(n); } }); }
public static void NodeSubscribe(this IService service, JNode node, JNodeEvent eventFilter, Action action) { service.NodeSubscribe(node, eventFilter, n => action()); }
public static void NodeSubscribe(this State state, JNode node, JNodeEvent eventFilter, Action action) { state.NodeSubscribe(node, eventFilter, n => action()); }
public static void NodeSubscribe(this Behaviour behaviour, JNode node, JNodeEvent eventFilter, Action action, bool alwaysActive = false) { behaviour.NodeSubscribe(node, eventFilter, n => action(), alwaysActive); }