Пример #1
0
    static int SetMemberDeadAction(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            FightManager obj = (FightManager)ToLua.CheckObject(L, 1, typeof(FightManager));
            System.Action <UnityEngine.GameObject, int, FightManager.MemberType> arg0 = null;
            LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

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

            obj.SetMemberDeadAction(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }