任何人请告诉我在 Sprite 上完成动画后如何获得事件?我正在使用 cocos2d 框架,
我的代码的某些部分是这样的..
-(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());
}
}
请告诉我任何解决方案或给我一些想法,如果你有,
提前致谢 ,
:)