2D Toolkit Forum

2D Toolkit => Support => Topic started by: theremin on June 02, 2012, 07:57:04 pm

Title: Get clip name in CompleteDelegate?
Post by: theremin on June 02, 2012, 07:57:04 pm
Is it possible to get the clip name (for the clip that's ending) in animationCompleteDelegate? Or, to ask it a different way: Is there an easy way to get a clip name from a clipId?

The method signature for the complete delegate is:

Code: [Select]
void CompleteDelegate(tk2dAnimatedSprite sprite, int clipId)
It would be cool if it was more powerful, like the event delegate:

Code: [Select]
void EventDelegate(tk2dAnimatedSprite sprite, tk2dSpriteAnimationClip clip, tk2dSpriteAnimationFrame frame, int frameNum)
i.e., I would love to have the tk2dSpriteAnimationClip clip instead of int clipId.
Title: Re: Get clip name in CompleteDelegate?
Post by: unikronsoftware on June 04, 2012, 01:22:02 am
I agree this is much better. I'll be revisiting the animation stuff soon, so I'll keep this in mind. I'm thinking of changing the clip concept, so everything uses clips rather than tk2dAnimatedSprites, so something like this will certainly make a lot more sense.