2D Toolkit Forum

2D Toolkit => Support => Topic started by: dmitsuki on March 19, 2013, 10:46:34 pm

Title: AnimationEventDelegate
Post by: dmitsuki 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?
Title: Re: AnimationEventDelegate
Post by: unikronsoftware 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.
Title: Re: AnimationEventDelegate
Post by: dmitsuki 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!