예제 #1
0
    static int AddOnClickListenerByCreate(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 5);
            UIBase obj = (UIBase)ToLua.CheckObject(L, 1, typeof(UIBase));
            UnityEngine.UI.Button arg0 = (UnityEngine.UI.Button)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.UI.Button));
            string arg1 = ToLua.CheckString(L, 3);
            InputEventHandle <InputUIOnClickEvent> arg2 = null;
            LuaTypes funcType4 = LuaDLL.lua_type(L, 4);

            if (funcType4 != LuaTypes.LUA_TFUNCTION)
            {
                arg2 = (InputEventHandle <InputUIOnClickEvent>)ToLua.CheckObject(L, 4, typeof(InputEventHandle <InputUIOnClickEvent>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 4);
                arg2 = DelegateFactory.CreateDelegate(typeof(InputEventHandle <InputUIOnClickEvent>), func) as InputEventHandle <InputUIOnClickEvent>;
            }

            string arg3 = ToLua.CheckString(L, 5);
            obj.AddOnClickListenerByCreate(arg0, arg1, arg2, arg3);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }