I created mine SKActionas follows:
unicornAction = [SKAction followPath:mypath asOffset:NO orientToPath:YES duration:0.1];
and added it to mine SKSprite:
[sprite runAction:[SKAction repeatActionForever:unicornAction] withKey:@"move"];
I do this so that I can adjust the speed at any time within the movement of sprites along the way.
When my sprite reaches the end of the path, I need a callback to remove the sprite. How can I get such a callback?
Also, is there a better way to use SKActionto accomplish what I'm trying to do, letting me change the speed anywhere during the execution of the actions?
source
share