In C# (and unity I suppose) there are 4 event types that you can subscribe to {Event, Start, End, Complete}, check out lines 45-53 in this file:
https://github.com/EsotericSoftware/spi ... onState.cs
Those 'delegates' are fired when their corresponding event is fired. The SpineBoy example I linked to only subscribes to the 'Event' event, which are "user" events defined in the editor. I think the most recent update of SpineBoy includes a 'footstep' event. [[Eg. you would register a listener for the footstep and play a footstep sound (or spawn a splash particle effect on wet ground)]]
Like what Pharan said with his code snippet above, you would need to register your handler (when setting up the Animation).
public class YourClass{
public void MyStartListener(AnimationState state, int trackIndex){
Debug.Log(trackIndex + " " + state.GetCurrent(trackIndex) + ": start ");
}
public void MyEndListener(AnimationState state, int trackIndex){
Debug.Log(trackIndex + " " + state.GetCurrent(trackIndex) + ": end");
}
public void MyLoopListener(AnimationState state, int trackIndex, int loopCount){
Debug.Log(trackIndex + " " + state.GetCurrent(trackIndex) + ": complete [" + loopCount + " loops]");
}
}
And during setup (or even when firing off the animation) you register for these events:
sk.state.Start += myClass.MyStartListener; // this.MyStartListener
sk.state.End += myClass.MyEndListener; // this.MyEndListener
sk.state.Complete += myClass.MyLoopListener; // this.MyLoopListener
Sometimes it's easier to start with a working example (like the SpineBoy example) and make modifications to that in order to get your head wrapped around how things work. Then, once you've grasped enough knowledge you can transfer to your work code.