我有以下代码:
-(void)aggravatedSeek:(SKSpriteNode *)target{
_isAggravated = YES;
SKAction *action = [SKAction runBlock:^{
double randTime = 0.2;
NSLog(@"%f", randTime);
[self moveToSpriteNode:target withTimeInterval:randTime];
}];
//SKAction *repeatAction = [SKAction repeatAction:action count:6];
SKAction *rep = [SKAction sequence:@[action, action, action, action, action]]; //Test Sequence
[self runAction:rep completion:^{
[self runAction:blackColorAction];
_isAggravated = NO;
}];
}
我希望我的行动真正等到前一个行动完成。意思是,我的动作需要排序,以便在对象完成移动之前该rep
动作不会重复该动作。action
目前,输出似乎立即运行所有操作,并且没有像应有的那样对它们进行排序。我已经阅读了文档,我现在所拥有的是他们所说的......