Beispiel #1
0
 static int SetLuaFunction(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         ColliderSprict obj  = (ColliderSprict)ToLua.CheckObject <ColliderSprict>(L, 1);
         LuaFunction    arg0 = ToLua.CheckLuaFunction(L, 2);
         obj.SetLuaFunction(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #2
0
    static int set_testNumber(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ColliderSprict obj  = (ColliderSprict)o;
            int            arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.testNumber = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index testNumber on a nil value"));
        }
    }
Beispiel #3
0
    static int get_testNumber(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ColliderSprict obj = (ColliderSprict)o;
            int            ret = obj.testNumber;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index testNumber on a nil value"));
        }
    }