private readonly Lua lua = new Lua();
static void Main(string[] args)
{
lua.RegisterFunction("talk", this, GetType().GetMethod("Talk"));
lua.DoFile("script.lua");
}
public void Talk(string s)
{
Console.WriteLine(s);
}
And the script.lua file:
talk("Hello World")

0 kommentarer:
Post a Comment