コード例 #1
0
    static int Listen(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 5)
            {
                UIEventListener        obj  = (UIEventListener)ToLua.CheckObject <UIEventListener>(L, 1);
                UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
                UnityEngine.EventSystems.EventTriggerType arg1 = (UnityEngine.EventSystems.EventTriggerType)ToLua.CheckObject(L, 3, typeof(UnityEngine.EventSystems.EventTriggerType));
                object      arg2 = ToLua.ToVarObject(L, 4);
                LuaFunction arg3 = ToLua.CheckLuaFunction(L, 5);
                obj.Listen(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 6)
            {
                UIEventListener        obj  = (UIEventListener)ToLua.CheckObject <UIEventListener>(L, 1);
                UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
                UnityEngine.EventSystems.EventTriggerType arg1 = (UnityEngine.EventSystems.EventTriggerType)ToLua.CheckObject(L, 3, typeof(UnityEngine.EventSystems.EventTriggerType));
                object      arg2 = ToLua.ToVarObject(L, 4);
                LuaFunction arg3 = ToLua.CheckLuaFunction(L, 5);
                object      arg4 = ToLua.ToVarObject(L, 6);
                obj.Listen(arg0, arg1, arg2, arg3, arg4);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UIEventListener.Listen"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }