Hello Guest

Author Topic: Get clip name in CompleteDelegate?  (Read 3427 times)


  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Get clip name in CompleteDelegate?
« 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.


  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Get clip name in CompleteDelegate?
« Reply #1 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.