Пример #1
0
    static int AddDragBegin(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 3);
            UI.StateHandle obj = (UI.StateHandle)ToLua.CheckObject(L, 1, typeof(UI.StateHandle));
            System.Action <UnityEngine.EventSystems.PointerEventData> arg0 = null;
            LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (System.Action <UnityEngine.EventSystems.PointerEventData>)ToLua.CheckObject(L, 2, typeof(System.Action <UnityEngine.EventSystems.PointerEventData>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(System.Action <UnityEngine.EventSystems.PointerEventData>), func) as System.Action <UnityEngine.EventSystems.PointerEventData>;
            }

            bool arg1 = LuaDLL.luaL_checkboolean(L, 3);
            obj.AddDragBegin(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }