We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8b131b commit 9a7cb83Copy full SHA for 9a7cb83
std/gdscript/ObjectEx.hx
@@ -0,0 +1,19 @@
1
+package gdscript;
2
+
3
+import haxe.macro.Context;
4
+import haxe.macro.Expr;
5
6
+class ObjectEx {
7
+ @:native("emit_signal")
8
+ public static macro function emit_signal(args: Array<Expr>): Expr {
9
+ final injectArgs = [];
10
+ for(i in 0...args.length) {
11
+ injectArgs.push('{$i}');
12
+ }
13
+ final injectString = 'emit_signal(${injectArgs.join(", ")})';
14
+ return {
15
+ expr: ECall(macro untyped __gdscript__, [macro $v{injectString}].concat(args)),
16
+ pos: Context.currentPos()
17
+ };
18
19
+}
0 commit comments