NSTimer vs SKAction (performance)

I'm a bit new to SpriteKit and Game development My question is, is it better to use SKAction like:

SKAction * shelvesAction = [SKAction performSelector:@selector(makeShelves) onTarget:self];
SKAction * delayAction = [SKAction waitForDuration:1];
SKAction * runShelvesForever = [SKAction repeatActionForever:[SKAction sequence:@[delayAction,shelvesAction]]];
[self runAction:runShelvesForever withKey:@"shelvesAction"];

      

Or just NSTimer

_shevesTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(makeShelves) userInfo:nil repeats:YES];

      

Which one is faster and what are the differences?

+3


source to share





All Articles