title: How to add to ammo if item collected sprite kit
body: <p>i have a game where the guy runs around and collects stuff. So I want the score keeper to update and increase if he collects an item and decrease if he uses the item. For example, life item. so here is the code I got so far for labels but that works with text score not integers. any ideas? thanks</p>
  
  <pre><code>   - (void)setupUI
            {
            int barHeight = 45;
            CGSize backgroundSize = CGSizeMake(self.size.width, barHeight);
            SKColor *backgroundColor = [SKColor colorWithWhite:10 alpha:50];
            SKSpriteNode *hudBarBackground = [SKSpriteNode spriteNodeWithColor:backgroundColor size:backgroundSize];
            hudBarBackground.position = CGPointMake(0, self.size.height - barHeight);
            hudBarBackground.anchorPoint = CGPointZero;
            [_hudLayerNode addChild:hudBarBackground];
            // 1
            SKLabelNode *scoreLabel = [SKLabelNode labelNodeWithFontNamed:@"AvenirNextCondensed-HeavyItalic"];
            // 2
            scoreLabel.fontSize = 20.0;
            scoreLabel.text = @"Score: 0";
            scoreLabel.name = @"scoreLabel";
            scoreLabel.fontColor = [SKColor orangeColor];
            // 3
            scoreLabel.verticalAlignmentMode = SKLabelVerticalAlignmentModeCenter;
            // 4
            scoreLabel.position = CGPointMake(self.size.width - self.size.width / 4, self.size.height - scoreLabel.frame.size.height + 3);
            // 5
  
            [_hudLayerNode addChild:scoreLabel];
            _scoreFlashAction = [SKAction sequence: @[[SKAction scaleTo:1.5 duration:0.1],      
            [SKAction scaleTo:1.0 duration:0.1]]];
            [scoreLabel runAction: [SKAction repeatAction:_scoreFlashAction count:10]];
            }
  </code></pre>