Yeah, I mean, I have triggers on most of my clips, some of them have 5 consecutive triggers, some have only 1. So I need to check them constantly.
For this, I binded the delegate to the following method:
void Start () {
anim = GetComponent<tk2dAnimatedSprite>();
spot = GameObject.Find("spot");
}
void animEvent(tk2dAnimatedSprite sprite, tk2dSpriteAnimationClip clip, tk2dSpriteAnimationFrame frame, int frameNum){
spot.transform.position = new Vector3(frame.eventInt,768,frame.eventFloat);
}
void Update () {
anim.animationEventDelegate = this.animEvent;
}
As you can see, triggers are all supposed to change the position of a GameObject (other than self). This concludes in a very slow and problematic experience in Unity's own Game screen (on consecutive triggers) but it ran smoothly on iPad, so I haven't messed with the code further.
If you tell me a more efficient way to control the triggers, I'd be happy to know.