internal LuaTable BindLua(BridgeMonoBehaviour bridgeMonoBehaviour)
 {
     return(bindFn_.Invoke <BridgeMonoBehaviour, string, string, LuaTable>(
                bridgeMonoBehaviour,
                bridgeMonoBehaviour.LuaClass,
                bridgeMonoBehaviour.SerializeData));
 }
示例#2
0
    static int Bind(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)ToLua.CheckObject(L, 1, typeof(CSharpLua.BridgeMonoBehaviour));
                LuaTable arg0 = ToLua.CheckLuaTable(L, 2);
                obj.Bind(arg0);
                return(0);
            }
            else if (count == 3)
            {
                CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)ToLua.CheckObject(L, 1, typeof(CSharpLua.BridgeMonoBehaviour));
                LuaTable arg0 = ToLua.CheckLuaTable(L, 2);
                string   arg1 = ToLua.CheckString(L, 3);
                obj.Bind(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: CSharpLua.BridgeMonoBehaviour.Bind"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
示例#3
0
 internal LuaTable BindLua(BridgeMonoBehaviour bridgeMonoBehaviour)
 {
     return(bindFn_.Invoke <BridgeMonoBehaviour, string, string, UnityEngine.Object[], LuaTable>(
                bridgeMonoBehaviour,
                bridgeMonoBehaviour.LuaClass,
                bridgeMonoBehaviour.SerializeData,
                bridgeMonoBehaviour.SerializeObjects));
 }
示例#4
0
    static int StartCoroutine(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <LuaInterface.LuaTable>(L, 2))
            {
                CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)ToLua.CheckObject(L, 1, typeof(CSharpLua.BridgeMonoBehaviour));
                LuaTable arg0           = ToLua.ToLuaTable(L, 2);
                UnityEngine.Coroutine o = obj.StartCoroutine(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <string>(L, 2))
            {
                CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)ToLua.CheckObject(L, 1, typeof(CSharpLua.BridgeMonoBehaviour));
                string arg0             = ToLua.ToString(L, 2);
                UnityEngine.Coroutine o = obj.StartCoroutine(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <System.Collections.IEnumerator>(L, 2))
            {
                CSharpLua.BridgeMonoBehaviour  obj  = (CSharpLua.BridgeMonoBehaviour)ToLua.CheckObject(L, 1, typeof(CSharpLua.BridgeMonoBehaviour));
                System.Collections.IEnumerator arg0 = (System.Collections.IEnumerator)ToLua.ToObject(L, 2);
                UnityEngine.Coroutine          o    = obj.StartCoroutine(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 3)
            {
                CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)ToLua.CheckObject(L, 1, typeof(CSharpLua.BridgeMonoBehaviour));
                string arg0             = ToLua.CheckString(L, 2);
                object arg1             = ToLua.ToVarObject(L, 3);
                UnityEngine.Coroutine o = obj.StartCoroutine(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: CSharpLua.BridgeMonoBehaviour.StartCoroutine"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
示例#5
0
 static int Bind(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)ToLua.CheckObject(L, 1, typeof(CSharpLua.BridgeMonoBehaviour));
         LuaTable arg0 = ToLua.CheckLuaTable(L, 2);
         obj.Bind(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#6
0
 static int RegisterUpdate(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)ToLua.CheckObject(L, 1, typeof(CSharpLua.BridgeMonoBehaviour));
         int         arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3);
         obj.RegisterUpdate(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#7
0
    static int set_SerializeObjects(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            CSharpLua.BridgeMonoBehaviour obj  = (CSharpLua.BridgeMonoBehaviour)o;
            UnityEngine.Object[]          arg0 = ToLua.CheckObjectArray <UnityEngine.Object>(L, 2);
            obj.SerializeObjects = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index SerializeObjects on a nil value"));
        }
    }
示例#8
0
    static int set_SerializeData(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)o;
            string arg0 = ToLua.CheckString(L, 2);
            obj.SerializeData = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index SerializeData on a nil value"));
        }
    }
示例#9
0
    static int get_Table(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)o;
            LuaInterface.LuaTable         ret = obj.Table;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index Table on a nil value"));
        }
    }
示例#10
0
    static int get_SerializeObjects(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)o;
            UnityEngine.Object[]          ret = obj.SerializeObjects;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index SerializeObjects on a nil value"));
        }
    }
示例#11
0
    static int get_SerializeData(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            CSharpLua.BridgeMonoBehaviour obj = (CSharpLua.BridgeMonoBehaviour)o;
            string ret = obj.SerializeData;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index SerializeData on a nil value"));
        }
    }