任何人都請告訴我如何在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());
}
}
請告訴我任何解決方案或給我一些想法,如果你有,提前
謝謝,
:)
所以你可以告訴我,你使用什麼解決方案? –