ios - How to make changes to SKActions periodically? -


i want change speedofrectangle after spawning few rectangles(skshapenodes).

func wait(factor: cgfloat = 1) -> skaction {     return skaction.waitforduration(nstimeinterval(rectheight * speedofrectangle * distancebetweenrectangles / factor)) }  let spawnsequence = skaction.sequence([wait(), increasecounter, spawnaction]) let spawnsequenceforever = skaction.repeatactionforever(spawnsequence)  worldnode.runaction(spawnsequenceforever) 

how make changes skactions periodically?

the easiest way change action remove old action , create new one. can remove actions removing "key" or remove actions running on node removeallactions().

changing actions while running has no effect until action completed , run again.

hope helped , luck.


Comments

Popular posts from this blog

c# - SharpDX Toolkit models rendering inside out -

c# - ajax - How to receive data both html and json from server? -