swift - Start the transition after 5 seconds -


hello how make transition

let transitiontype = sktransition.crossfadewithduration (2.0) 

started after 5 seconds?

my code:

let nextlevel = level2(size: size) nextlevel.scalemode = scalemode let transitiontype = sktransition.crossfadewithduration(2.0)        view?.presentscene(nextlevel,transition: transitiontype) 

you use skaction.waitforduration combined skaction.runblock in skaction sequence:

let wait = skaction.waitforduration(5) let action = skaction.runblock {     view?.presentscene(nextlevel, transition: transitiontype) }  self.runaction(skaction.sequence([wait, action])) 

Comments

Popular posts from this blog

xslt - Substring before throwing error -

Google Cloud Bigtable Durability/Availability Guarantees -

Android M doze mode and "native" posix socket freezing up -