I am programming a game, and using a SKLabel to view the current score. The problem is that when score changes it doesn't display the change in the screen at the moment, it does after a second more or less. What can I do to see the changes in the moment I use [sklabelscore setTextScore:++self.score]
. Can I force render or something similar?
I call the setTextScore when the user touches an enemy, with touchesBegan:withEvent:
setTextScore:
implementation is
SKLabelNode* scoreLabel=(SKLabelNode*)[self childNodeWithName:@"scoreLabel"];
scoreLabel.text=[NSString stringWithFormat:@"Score: %d",self.score];