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