swift - Run Two Action At The Same Time Inside ONE Sequence -


i'm not sure if i'm seeking possible, i'm checking make sure i'm not doing thing hard way.

at moment have 2 sequences, both run @ same time. each sequence starts off waiting 3 seconds , 1 sequence scales node, other adjusts node's alpha. code looks this:

node.runaction(skaction.sequence([animationwait, animationscale])) node.runaction(skaction.sequence([animationwait, animationalpha])) 

but there way of running both animationscale , animationalpha @ same time inside 1 sequence? (this doesn't work, i'm hoping can see i'm trying do):

node.runaction(skaction.sequence([animationwait, (animationscale, animationalpha)])) 

you can group actions sequence:

var actions = array<skaction>();  actions.append(skaction.sequence([animationwait, animationscale])); actions.append(skaction.sequence([animationwait, animationalpha]));  let group = skaction.group(actions);  node.runaction(group); 

when action executes, actions comprise group start , run in parallel. duration of group action longest duration among collection of actions. if action in group has duration less group’s duration, action completes, idles until group completes remaining actions. matters when creating repeating action repeats group.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -