Hello Guest

Author Topic: Help with AnimationEventTriggered  (Read 3258 times)

Cybertiger

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Help with AnimationEventTriggered
« on: January 13, 2014, 08:18:59 pm »
Hello,

I can't figure out why below is not triggering? I have tripple and quadruple checked that the trigger is set on the specific clip.

Code: [Select]
//play the Idle clip
animator.Play("Idle");

//call the event
animator.AnimationEventTriggered = pushUpEvent;

void pushUpEvent(tk2dSpriteAnimator animator, tk2dSpriteAnimationClip clip, int frameNo)
{
        tk2dSpriteAnimationFrame frame = clip.GetFrame( frameNo );
        print ("EVENT: info is " + frame.eventInfo);
}

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Help with AnimationEventTriggered
« Reply #1 on: January 14, 2014, 10:35:32 am »
I would test this in demo scene #5. Use that clip, then check your clip on the demo - that will rule things out pretty much straight away. If you still can't figure it out set up a minimal repro case and email support at unikronsoftware.com