Exemple #1
0
        protected void testLuaBindFile()
        {
            LuaScriptMgr luaMgr = Ctx.m_instance.m_luaScriptMgr;
            luaMgr.lua.DoFile("Common/Prerequisites.lua");

            LuaCSBridge _luaCSBridge = new LuaCSBridge("testTable");
            string path = "Test/TestLuaBind.lua";      // 
            _luaCSBridge.DoFile(path);                      // 添加函数,如果 "TestLuaBind.lua" 文件直接调用了一个函数,例如 luaFunc(10) ,执行 DoFile 后返回值是 null ,注意这一点,但是自己手工调用这个函数却有返回值的。
            object[] ret = _luaCSBridge.CallMethod("tableFunc", 10);

            object member = _luaCSBridge.GetMember("tableData");
        }
Exemple #2
0
 public AuxComponent(LuaCSBridge luaCSBridge_ = null)
 {
     m_luaCSBridge        = luaCSBridge_;
     m_bNeedPlaceHolderGo = false;
 }
Exemple #3
0
 public AuxComponent(LuaCSBridge luaCSBridge_ = null)
 {
     m_luaCSBridge = luaCSBridge_;
     m_bNeedPlaceHolderGo = false;
 }