Noirand icon

MoonSharp メモ

Noirand | PRO | 04/10/16 04:33:12 AM UTC | 0 ⭐ | 221 👁️ | Never ⏰ | []
text |

1.07 KB

|

None

|

0 👍

/

0 👎

◆ MoonSharp のコルーチンについて:
http://www.moonsharp.org/coroutines.html
 ◆ Lua の関数を C# 側から呼び出す
Script m_Lua = new Script();
m_Lua.DoFile(luafile);
DynValue func = m_Lua.Call(m_Lua.Globals[関数名], 引数);
http://www.moonsharp.org/callback.html
 ◆ Lua ファイルをコルーチンとして C# から呼び出す
Script m_Lua = new Script();
DynValue m_Func = m_Lua.DoFile(luaFile);
DynValue m_LuaCor = m_Lua.CreateCoroutine(m_Func);
foreach (DynValue x in m_LuaCor.Coroutine.AsTypedEnumerable())
{
	...
}
 ◆ Lua の任意の関数をコルーチンとして C# から呼び出す
Script m_Lua = new Script();
m_Lua.DoFile(luaFile);
DynValue m_Func = m_Lua.Globals.Get("func");
DynValue m_LuaCor = m_Lua.CreateCoroutine(m_Func);
foreach (DynValue x in m_LuaCor.Coroutine.AsTypedEnumerable())
{
	...
}
 ◆ C# の関数を Lua 側から呼び出す
http://www.moonsharp.org/objects.html
 ◆ C# の Enum を Lua で使う
https://groups.google.com/forum/#!searchin/moonsharp/enum/moonsharp/ZA3aIIeyyMs/wh6asehcHAAJ

Comments