Пример #1
0
    static int set_onDrapDownChanged(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UGUILuaEventListener             obj  = (UGUILuaEventListener)o;
            UGUILuaEventListener.IntDelegate arg0 = null;
            LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (UGUILuaEventListener.IntDelegate)ToLua.CheckObject(L, 2, typeof(UGUILuaEventListener.IntDelegate));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(UGUILuaEventListener.IntDelegate), func) as UGUILuaEventListener.IntDelegate;
            }

            obj.onDrapDownChanged = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onDrapDownChanged on a nil value" : e.Message));
        }
    }
Пример #2
0
    static int get_onDrapDownChanged(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UGUILuaEventListener             obj = (UGUILuaEventListener)o;
            UGUILuaEventListener.IntDelegate ret = obj.onDrapDownChanged;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onDrapDownChanged on a nil value" : e.Message));
        }
    }