如何检查 aSKAction
是否已完成动画?
我需要检查我的操作是否已经完成或仍在执行其操作。之后,我想创建一个布尔值以避免在主要操作期间执行多个操作。
SKAction *lionJumpActionComplete = [lionNode actionForKey:@"lionIsJumping"];
lionJumpActionComplete = [SKAction sequence: @[lionJumpActionUp, lionJumpActionFly, lionJumpActionDown, lionJumpActionPause]];
if (lionJumpActionComplete) {
return;
}
[lionNode runAction:lionJumpActionComplete withKey:@"lionIsJumping"];