这是我真正想要的论点,但它不起作用。这样做的正确方法是什么?任何想法?
if (targetWithinRange == NO) {
SKAction *move = [SKAction moveToX:-30 duration:1]; //Warning Unused Variable 'move'
}else{ //or if the target is within rang then go and hit the target
SKAction *move = [SKAction moveTo:(CGPointMake(target.position.x, target.position.y)) duration:1];//Warning Unused Variable 'move'
}
SKAction *lookingForTheTarget = [SKAction sequence:@[someAction,move,anotherAction]];
[ourSprite runAction:lookingForTheTarget];