Esempio n. 1
0
    static int set_m_onDrop(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.DropControl         obj  = (UI.DropControl)o;
            System.Action <object> arg0 = null;
            LuaTypes funcType2          = LuaDLL.lua_type(L, 2);

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

            obj.m_onDrop = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_onDrop on a nil value" : e.Message));
        }
    }
Esempio n. 2
0
 static int OnDrop(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UI.DropControl obj = (UI.DropControl)ToLua.CheckObject(L, 1, typeof(UI.DropControl));
         UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)ToLua.CheckObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData));
         obj.OnDrop(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 3
0
    static int get_m_onDrop(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UI.DropControl         obj = (UI.DropControl)o;
            System.Action <object> ret = obj.m_onDrop;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_onDrop on a nil value" : e.Message));
        }
    }