我在雪碧Builder中放置了CCBFile並添加到主場景中,現在當我運行CCBFile動畫自動啓動的項目時。我想在延遲後開始或打電話...任何想法?如何在cocos2d上啓動CCBFile動畫?
這裏是我的代碼...
@implementation MainScene {
CCPhysicsNode *_physicsNode;
CCNode *playerbackwardshort;
}
// is called when CCB file has completed loading
- (void)didLoadFromCCB {
//For Delay
[self performSelector:@selector(Upgrade) withObject:nil afterDelay:0.6];
}
-(void)Upgrade{
CCBAnimationManager* am = self.userObject;
[am runAnimationsForSequenceNamed:@"playerbackwardshort"];
}
顯示相關代碼,請... – sergio
@sergio現在你可以閱讀我的代碼 –