Remove() public method

public Remove ( EventCallback0 callback ) : void
callback EventCallback0
return void
コード例 #1
0
 static public int Remove(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(FairyGUI.EventCallback0)))
         {
             FairyGUI.EventListener  self = (FairyGUI.EventListener)checkSelf(l);
             FairyGUI.EventCallback0 a1;
             LuaDelegation.checkDelegate(l, 2, out a1);
             self.Remove(a1);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(FairyGUI.EventCallback1)))
         {
             FairyGUI.EventListener  self = (FairyGUI.EventListener)checkSelf(l);
             FairyGUI.EventCallback1 a1;
             LuaDelegation.checkDelegate(l, 2, out a1);
             self.Remove(a1);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #2
0
    static int Remove(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <FairyGUI.EventCallback0>(L, 2))
            {
                FairyGUI.EventListener  obj  = (FairyGUI.EventListener)ToLua.CheckObject <FairyGUI.EventListener>(L, 1);
                FairyGUI.EventCallback0 arg0 = (FairyGUI.EventCallback0)ToLua.ToObject(L, 2);
                obj.Remove(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes <FairyGUI.EventCallback1>(L, 2))
            {
                FairyGUI.EventListener  obj  = (FairyGUI.EventListener)ToLua.CheckObject <FairyGUI.EventListener>(L, 1);
                FairyGUI.EventCallback1 arg0 = (FairyGUI.EventCallback1)ToLua.ToObject(L, 2);
                obj.Remove(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.EventListener.Remove"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #3
0
    static int Remove(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.EventListener), typeof(FairyGUI.EventCallback0)))
            {
                FairyGUI.EventListener  obj  = (FairyGUI.EventListener)ToLua.ToObject(L, 1);
                FairyGUI.EventCallback0 arg0 = null;
                LuaTypes funcType2           = LuaDLL.lua_type(L, 2);

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

                obj.Remove(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.EventListener), typeof(FairyGUI.EventCallback1)))
            {
                FairyGUI.EventListener  obj  = (FairyGUI.EventListener)ToLua.ToObject(L, 1);
                FairyGUI.EventCallback1 arg0 = null;
                LuaTypes funcType2           = LuaDLL.lua_type(L, 2);

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

                obj.Remove(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.EventListener.Remove"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #4
0
        public void RemoveEventListener(string strType, EventCallback1 callback)
        {
            if (_dic == null)
            {
                return;
            }

            EventListener listener = null;

            if (_dic.TryGetValue(strType, out listener))
            {
                listener.Remove(callback);
            }
        }
コード例 #5
0
    static int Remove(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                FairyGUI.EventListener  obj  = (FairyGUI.EventListener)ToLua.CheckObject <FairyGUI.EventListener>(L, 1);
                FairyGUI.EventCallback1 arg0 = (FairyGUI.EventCallback1)ToLua.CheckDelegate <FairyGUI.EventCallback1>(L, 2);
                obj.Remove(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <LuaInterface.LuaTable>(L, 3))
            {
                FairyGUI.EventListener obj  = (FairyGUI.EventListener)ToLua.CheckObject <FairyGUI.EventListener>(L, 1);
                LuaFunction            arg0 = ToLua.CheckLuaFunction(L, 2);
                LuaTable arg1 = ToLua.ToLuaTable(L, 3);
                obj.Remove(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <FairyGUI.GComponent>(L, 3))
            {
                FairyGUI.EventListener obj  = (FairyGUI.EventListener)ToLua.CheckObject <FairyGUI.EventListener>(L, 1);
                LuaFunction            arg0 = ToLua.CheckLuaFunction(L, 2);
                FairyGUI.GComponent    arg1 = (FairyGUI.GComponent)ToLua.ToObject(L, 3);
                obj.Remove(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.EventListener.Remove"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }