我在 Sprite Builder 中找到 CCBFile 并添加到主场景中,现在当我运行项目时 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"];
}