mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Changed listener to interface.
This commit is contained in:
parent
9ee2a1c1c0
commit
6e328e3cbd
@ -245,21 +245,31 @@ public class AnimationState {
|
|||||||
AnimationStateListener listener;
|
AnimationStateListener listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
static public abstract class AnimationStateListener {
|
static public interface AnimationStateListener {
|
||||||
/** Invoked when the current animation triggers an event. */
|
/** Invoked when the current animation triggers an event. */
|
||||||
public void event (Event event) {
|
public void event (Event event);
|
||||||
}
|
|
||||||
|
|
||||||
/** Invoked when the current animation has completed.
|
/** Invoked when the current animation has completed.
|
||||||
* @param loopCount The number of times the animation reached the end. */
|
* @param loopCount The number of times the animation reached the end. */
|
||||||
|
public void complete (int loopCount);
|
||||||
|
|
||||||
|
/** Invoked just after the current animation is set. */
|
||||||
|
public void start ();
|
||||||
|
|
||||||
|
/** Invoked just before the current animation is replaced. */
|
||||||
|
public void end ();
|
||||||
|
}
|
||||||
|
|
||||||
|
static public abstract class AnimationStateAdapter implements AnimationStateListener {
|
||||||
|
public void event (Event event) {
|
||||||
|
}
|
||||||
|
|
||||||
public void complete (int loopCount) {
|
public void complete (int loopCount) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Invoked just after the current animation is set. */
|
|
||||||
public void start () {
|
public void start () {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Invoked just before the current animation is replaced. */
|
|
||||||
public void end () {
|
public void end () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user