예제 #1
0
		static WrenForeignMethodFn BindForeignMethod(WrenVM VM, string Module, string ClassName, bool Static, string Sig) {
			if (ClassName == "DotNet" && Static) {
				if (Sig == "SomeFunction()")
					return SomeFunction;
			}
			return null;
		}
예제 #2
0
 public static extern void ReturnString(this WrenVM VM, string Txt = "", int Len = -1);
예제 #3
0
 public static extern void ReturnDouble(this WrenVM VM, double Val = 0.0);
예제 #4
0
 public static extern void ReturnBool(this WrenVM VM, bool Val = false);
예제 #5
0
 public static extern string GetArgumentString(this WrenVM VM, int Idx);
예제 #6
0
 public static extern double GetArgumentDouble(this WrenVM VM, int Idx);
예제 #7
0
 public static extern bool GetArgumentBool(this WrenVM VM, int Idx);
예제 #8
0
 public static extern void ReleaseMethod(this WrenVM VM, IntPtr Method);
예제 #9
0
 public static extern void Call(this WrenVM VM, IntPtr Method, string Types, __arglist);
예제 #10
0
 public static extern IntPtr GetMethod(this WrenVM VM, string Module, string Variable, string Signature);
예제 #11
0
 public static extern WrenInterpretResult Interpret(this WrenVM VM, string SrcPath, string Src);
예제 #12
0
 public static extern void FreeVM(this WrenVM VM);
예제 #13
0
		static string LoadModule(WrenVM VM, string Module) {
			if (File.Exists(Module))
				return File.ReadAllText(Module);
			return "";
		}
예제 #14
0
		static void SomeFunction(WrenVM VM) {
			VM.ReturnString("Hello Wren World #" + Rand.Next(1, 100) + "!");
		}