ios - How to use runAction syntax correctly for the following -
i'm trying following
//increase spaceship frequency self.runaction(skaction.repeatactionforever(skaction.waitforduration(1), completion: { difficulty -= 0.01 println("difficulty increased") }))
basically need skaction.waitforduration(1) completion run forever tried wrap around runaction
i following error: "extra argument 'completion' in call"
if want use spritekit
, use action sequence:
self.runaction(skaction.repeatactionforever(skaction.sequence([skaction.waitforduration(1), skaction.runblock({ difficulty -= 0.01; println("difficulty increased"); })])));
but, should using nstimer
.