Any one please tell me how can i get an event after completion of the animation on the Sprite ?
I am using cocos2d frame work,
Some part of my code is like this..
-(void)playerTouchHurdlesOnFlore:(LHContactInfo*)contact
{
if(!isHurdlesAnimStart)
{
isHurdlesAnimStart=YES;
onGround=NO;
[player stopAnimation];
//[player setIsRelativeAnchorPoint:NO];
// I want to call any event or function after end of the this "Fall_Down" animation.
[player startAnimationNamed:@"Fall_Down"];
jumpCounter = 0.3f;
player.body->ApplyLinearImpulse(b2Vec2(0,2.0f), player.body->GetPosition());
}
}
Please tell me any solution or give me some idea if you have,
Thanks in advance ,
🙂
Can you check the docs of sprite and cocoa2d, there should be a delegate method like
but this method is for Core Animation