Вы должны заглянуть в класс Timer . Вот ссылка на обзор класса Timer - cocos2d для iPhone 0.8.2 . Вам не нужно будет реализовывать его напрямую (но косвенно), но полезно знать, как он работает.
Для отображения фактического счетчика на экране с помощью cocos2d, посмотрите на LabelAtlas . Вот ссылка на обзор класса LabelAtlas - cocos2d для iPhone 0.8.2
/* basically you create a LabelAtlas subclass that
has a method for updating itself with the current time
or score. I will call it ScoreLabel in this example */
ScoreLabel * bonusScore = [[ScoreLabel alloc] initWithString:@"0"
charMapFile:@"charMap.png"
itemWidth:10
itemHeight:10
startCharMap:'0'];
// then schedule a method to be called that updates the current score
// schedule: paramter of type SEL. It should pass the method to be scheduled
// interval is in seconds, it determines how often the method is called.
[bonusScore schedule:@selector(updateScore) interval:0.5];
/* the implementation of the updateScore method could be */
-(void)updateScore {
[self setString: [[World sharedWorld] timeLeft]]];
}
Посмотрите примеры cocos2d для AtlasSprites (и для LabelAtlas), чтобы узнать, как реализовать образ, необходимый для поддержки класса.