Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spine's listener can not be removed #17342

Merged
merged 3 commits into from
Jul 9, 2024

Conversation

bofeng-song
Copy link
Contributor

@bofeng-song bofeng-song commented Jul 9, 2024

Re: #
cocos/cocos-engine-external#452
#17030
#17261

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@bofeng-song bofeng-song requested a review from minggo July 9, 2024 08:11
Copy link

github-actions bot commented Jul 9, 2024

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -52472,9 +52472,9 @@
                 clearEffect();
                 setJitterEffect(jitter: spine.VertexEffect);
                 setSwirlEffect(swirl: spine.VertexEffect);
                 updateRenderData();
-                setListener(id: number, type: number);
+                setListener(id: number);
                 setDebugMode(debug: boolean);
                 getDebugShapes();
                 resizeSlotRegion(slotName: string, width: number, height: number, createNew: boolean);
                 setSlotTexture(slotName: string, index: number);
@@ -69237,22 +69237,19 @@
             reset(): void;
             _syncAttachedNode(): void;
             matrixHandle(node: Node, bone: any): void;
         }
-        export type _cocos_spine_track_entry_listeners__TrackListener = (x: sp.spine.TrackEntry) => void;
-        export type _cocos_spine_track_entry_listeners__TrackListener2 = (x: sp.spine.TrackEntry, ev: sp.spine.Event) => void;
-        export type _cocos_spine_track_entry_listeners__CommonTrackEntryListener = _cocos_spine_track_entry_listeners__TrackListener | _cocos_spine_track_entry_listeners__TrackListener2;
         export class _cocos_spine_track_entry_listeners__TrackEntryListeners {
             start?: ((entry: sp.spine.TrackEntry) => void);
             interrupt?: ((entry: sp.spine.TrackEntry) => void);
             end?: ((entry: sp.spine.TrackEntry) => void);
             dispose?: ((entry: sp.spine.TrackEntry) => void);
             complete?: ((entry: sp.spine.TrackEntry) => void);
             event?: ((entry: sp.spine.TrackEntry, event: sp.spine.Event) => void);
             static getListeners(entry: sp.spine.TrackEntry, instance: sp.spine.SkeletonInstance): sp.spine.AnimationStateListener;
-            static emitListener(id: number, entry: sp.spine.TrackEntry, event: sp.spine.Event): void;
+            static emitListener(id: number, entry: sp.spine.TrackEntry, event: sp.spine.Event, eventType: sp.spine.EventType): void;
             static emitTrackEntryListener(id: number, entry: sp.spine.TrackEntry, event: sp.spine.Event, eventType: sp.spine.EventType): void;
-            static addListener(listener: _cocos_spine_track_entry_listeners__CommonTrackEntryListener): number;
+            static addListener(listener: _cocos_spine_track_entry_listeners__TrackEntryListeners): number;
         }
         export class _cocos_spine_skeleton_cache__SpineDrawItem {
             iCount: number;
             blendMode: number;

@minggo minggo merged commit 141ebfb into cocos:v3.8.4 Jul 9, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants