Hello Guest

Author Topic: AnimationEventDelegate  (Read 4020 times)

dmitsuki

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
AnimationEventDelegate
« on: March 19, 2013, 10:46:34 pm »
How do I use AnimationEventDelegate to script an event that happens in the middle of an animation at a certain frame number?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: AnimationEventDelegate
« Reply #1 on: March 19, 2013, 11:17:41 pm »
Add a trigger to the frame you're interested in, and then hook into the delegate.
You can see how this is set up in sample 5. The "Message" demo is what you want.

Check the code in tk2dDemoAnimController.cs for an example of how to use the delegate if you're not familiar with it.

dmitsuki

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: AnimationEventDelegate
« Reply #2 on: March 19, 2013, 11:30:27 pm »
Thanks, I will look into that and reply here if I have any more questions.

Update : Figured it out and it works perfectly, thanks!
« Last Edit: March 20, 2013, 12:01:09 am by dmitsuki »