Example #1
0
    //反射已经无法区分这些重载函数了
    void Start()
    {
        LuaScriptMgr mgr = new LuaScriptMgr();

        mgr.Start();
        TestOverrideWrap.Register(mgr.GetL());
        TestOverride_SpaceWrap.Register(mgr.GetL());
        mgr.DoString(script);

        TestOverride to   = new TestOverride();
        LuaFunction  func = mgr.GetLuaFunction("Test");

        func.Call(to);
    }
Example #2
0
    private void Start()
    {
        LuaScriptMgr luaScriptMgr = new LuaScriptMgr();

        luaScriptMgr.Start();
        TestOverrideWrap.Register(luaScriptMgr.GetL());
        TestOverride_SpaceWrap.Register(luaScriptMgr.GetL());
        luaScriptMgr.DoString(this.script);
        TestOverride testOverride = new TestOverride();
        LuaFunction  luaFunction  = luaScriptMgr.GetLuaFunction("Test");

        luaFunction.Call(new object[]
        {
            testOverride
        });
    }