mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[Unity] Extra constructors for WaitForSpineEvent
This commit is contained in:
parent
914419d5fa
commit
4a7d3ecf96
@ -75,9 +75,19 @@ namespace Spine {
|
|||||||
Subscribe(state, eventDataReference, unsubscribeAfterFiring);
|
Subscribe(state, eventDataReference, unsubscribeAfterFiring);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WaitForSpineEvent (SkeletonAnimation skeletonAnimation, Spine.EventData eventDataReference, bool unsubscribeAfterFiring = true) {
|
||||||
|
// If skeletonAnimation is invalid, its state will be null. Subscribe handles null states just fine.
|
||||||
|
Subscribe(skeletonAnimation.state, eventDataReference, unsubscribeAfterFiring);
|
||||||
|
}
|
||||||
|
|
||||||
public WaitForSpineEvent (Spine.AnimationState state, string eventName, bool unsubscribeAfterFiring = true) {
|
public WaitForSpineEvent (Spine.AnimationState state, string eventName, bool unsubscribeAfterFiring = true) {
|
||||||
SubscribeByName(state, eventName, unsubscribeAfterFiring);
|
SubscribeByName(state, eventName, unsubscribeAfterFiring);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WaitForSpineEvent (SkeletonAnimation skeletonAnimation, string eventName, bool unsubscribeAfterFiring = true) {
|
||||||
|
// If skeletonAnimation is invalid, its state will be null. Subscribe handles null states just fine.
|
||||||
|
SubscribeByName(skeletonAnimation.state, eventName, unsubscribeAfterFiring);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Event Handlers
|
#region Event Handlers
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user