Reputation: 53
I want to run two SKActions at the same time:
SKAction.move
and
SKAction.fadeAlpha
.
I've already found solutions in Objective-C, but I'm looking for solutions in Swift.
Currently I'm using SKAction.sequence ([SKAction.move (to: event.location (in: self), duration: 3), SKAction.fadeAlpha (to: 0, duration: 1)])
but I want to that both SKActions are executed at the same time and not consecutively.
Upvotes: 0
Views: 119
Reputation: 990
Try using SKAction.group
to run several actions at the same time.
More info here: https://developer.apple.com/documentation/spritekit/skaction/1417688-group
Upvotes: 3