title: How can I change Sprite Image every half a second?
body: <p>I have been trying to achieve this from this morning but haven't figured it out. I have a SKSpriteNode which is an Image that displays the name of my game on the main screen. What I am trying to achieve is to change those images every half a second. I have made multiple images of the name with different colors so I can change images every half a second.That will give the effect of the title changing colors like a typical arcade game. This is what I have done so far...</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      _images = [NSArray arrayWithObjects:@"YellowLabel.png", @"BlueLabel.png", @"GreenLabel.png", @"RedLabel.png", @"WhiteLabel.png", nil];
  
      NSTimer *myTimer = [NSTimer timerWithTimeInterval:0.5 target:self selector:@selector(doAnimation) userInfo:nil repeats:YES];
  
      // Configure the view.
      SKView * skView = (SKView *)self.view;
      skView.showsFPS = YES;
      skView.showsNodeCount = YES;
  
      // Create and configure the scene.
      SKScene * scene = [TitleScene sceneWithSize:skView.bounds.size];
      scene.scaleMode = SKSceneScaleModeAspectFill;
  
      SKSpriteNode *labelNode = [SKSpriteNode spriteNodeWithImageNamed:@"WhiteLabel.png"];
      labelNode.position = CGPointMake(160, 400);
  
      // Present the scene.
      [skView presentScene:scene];
      [self doAnimation];
      [scene addChild:labelNode];
  }
  </code></pre>
  
  <p>And I also have this additional method:</p>
  
  <pre><code>-(void)doAnimation {
      SKSpriteNode *labelNode = [SKSpriteNode spriteNodeWithImageNamed:@"WhiteLabel.png"];
      static int counter = 0;
      if ([_images count] == counter+1) {
          counter = 0;
      }
      labelNode = [SKSpriteNode spriteNodeWithImageNamed:[_images objectAtIndex:counter]];
  }
  </code></pre>
  
  <p>Thanks for any help!</p>