static int RemoveEventListener(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 3);
            DragonBones.UnityEventDispatcher <DragonBones.EventObject> obj = (DragonBones.UnityEventDispatcher <DragonBones.EventObject>)ToLua.CheckObject(L, 1, typeof(DragonBones.UnityEventDispatcher <DragonBones.EventObject>));
            string arg0 = ToLua.CheckString(L, 2);
            DragonBones.ListenerDelegate <DragonBones.EventObject> arg1 = null;
            LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

            if (funcType3 != LuaTypes.LUA_TFUNCTION)
            {
                arg1 = (DragonBones.ListenerDelegate <DragonBones.EventObject>)ToLua.CheckObject(L, 3, typeof(DragonBones.ListenerDelegate <DragonBones.EventObject>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 3);
                arg1 = DelegateFactory.CreateDelegate(typeof(DragonBones.ListenerDelegate <DragonBones.EventObject>), func) as DragonBones.ListenerDelegate <DragonBones.EventObject>;
            }

            obj.RemoveEventListener(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int DispatchEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         DragonBones.UnityEventDispatcher <DragonBones.EventObject> obj = (DragonBones.UnityEventDispatcher <DragonBones.EventObject>)ToLua.CheckObject(L, 1, typeof(DragonBones.UnityEventDispatcher <DragonBones.EventObject>));
         string arg0 = ToLua.CheckString(L, 2);
         DragonBones.EventObject arg1 = (DragonBones.EventObject)ToLua.CheckObject(L, 3, typeof(DragonBones.EventObject));
         obj.DispatchEvent(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int HasEventListener(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         DragonBones.UnityEventDispatcher <DragonBones.EventObject> obj = (DragonBones.UnityEventDispatcher <DragonBones.EventObject>)ToLua.CheckObject(L, 1, typeof(DragonBones.UnityEventDispatcher <DragonBones.EventObject>));
         string arg0 = ToLua.CheckString(L, 2);
         bool   o    = obj.HasEventListener(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 4
0
 static int RemoveEventListener(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         DragonBones.UnityEventDispatcher <DragonBones.EventObject> obj = (DragonBones.UnityEventDispatcher <DragonBones.EventObject>)ToLua.CheckObject <DragonBones.UnityEventDispatcher <DragonBones.EventObject> >(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         DragonBones.ListenerDelegate <DragonBones.EventObject> arg1 = (DragonBones.ListenerDelegate <DragonBones.EventObject>)ToLua.CheckDelegate <DragonBones.ListenerDelegate <DragonBones.EventObject> >(L, 3);
         obj.RemoveEventListener(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }