mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
[ts] Made AnimationStateListener functions optional (#1955)
Co-authored-by: Jordan Lee <jordan.lee@aberrantsoftware.com>
This commit is contained in:
parent
db92cb3667
commit
674f53cccc
@ -1095,24 +1095,24 @@ export enum EventType {
|
|||||||
* {@link AnimationState#addListener()}. */
|
* {@link AnimationState#addListener()}. */
|
||||||
export interface AnimationStateListener {
|
export interface AnimationStateListener {
|
||||||
/** Invoked when this entry has been set as the current entry. */
|
/** Invoked when this entry has been set as the current entry. */
|
||||||
start (entry: TrackEntry): void;
|
start? (entry: TrackEntry): void;
|
||||||
|
|
||||||
/** Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for
|
/** Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for
|
||||||
* mixing. */
|
* mixing. */
|
||||||
interrupt (entry: TrackEntry): void;
|
interrupt? (entry: TrackEntry): void;
|
||||||
|
|
||||||
/** Invoked when this entry is no longer the current entry and will never be applied again. */
|
/** Invoked when this entry is no longer the current entry and will never be applied again. */
|
||||||
end (entry: TrackEntry): void;
|
end? (entry: TrackEntry): void;
|
||||||
|
|
||||||
/** Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry.
|
/** Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry.
|
||||||
* References to the entry should not be kept after dispose is called, as it may be destroyed or reused. */
|
* References to the entry should not be kept after dispose is called, as it may be destroyed or reused. */
|
||||||
dispose (entry: TrackEntry): void;
|
dispose? (entry: TrackEntry): void;
|
||||||
|
|
||||||
/** Invoked every time this entry's animation completes a loop. */
|
/** Invoked every time this entry's animation completes a loop. */
|
||||||
complete (entry: TrackEntry): void;
|
complete? (entry: TrackEntry): void;
|
||||||
|
|
||||||
/** Invoked when this entry's animation triggers an event. */
|
/** Invoked when this entry's animation triggers an event. */
|
||||||
event (entry: TrackEntry, event: Event): void;
|
event? (entry: TrackEntry, event: Event): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export abstract class AnimationStateAdapter implements AnimationStateListener {
|
export abstract class AnimationStateAdapter implements AnimationStateListener {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user