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

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -