Beispiel #1
0
    public static OutCSharpParam TestLuaCallByClass(IntoCSharpParam param)
    {
        OutCSharpParam ret = new OutCSharpParam();

        ret.m_outParam = param.m_intoParam;
        return(ret);
    }
Beispiel #2
0
 static int CreateIntoCSharpParam(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         IntoCSharpParam o = GUtil.CreateIntoCSharpParam();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #3
0
 static int TestLuaCallByClass(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         IntoCSharpParam arg0 = (IntoCSharpParam)ToLua.CheckObject <IntoCSharpParam>(L, 1);
         OutCSharpParam  o    = GUtil.TestLuaCallByClass(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #4
0
    static int set_m_intoParam(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            IntoCSharpParam obj  = (IntoCSharpParam)o;
            LuaTable        arg0 = ToLua.CheckLuaTable(L, 2);
            obj.m_intoParam = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index m_intoParam on a nil value"));
        }
    }
Beispiel #5
0
    static int get_m_intoParam(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            IntoCSharpParam       obj = (IntoCSharpParam)o;
            LuaInterface.LuaTable ret = obj.m_intoParam;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index m_intoParam on a nil value"));
        }
    }
Beispiel #6
0
    static int _CreateIntoCSharpParam(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                IntoCSharpParam obj = new IntoCSharpParam();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: IntoCSharpParam.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }