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