Created
November 2, 2011 15:47
-
-
Save talentless/1333984 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "cocos2d.h" | |
@interface TGScoreLabel : CCLabelTTF { | |
double curScore_; // the current score value of the label | |
BOOL updating_; // if we currently have an update running | |
double interval_; // how long we wait between updates | |
int score; // the target score | |
NSString * formatString; // the string that we format | |
int pointsPerSecond; // how fast we update | |
} | |
@property int score; | |
@property (nonatomic, retain) NSString * formatString; | |
@property int pointsPerSecond; | |
// give me that object! | |
+(id) scoreLabelWithFormatString:(NSString*)formatString score:(int)score dimensions:(CGSize)dimensions alignment:(CCTextAlignment)alignment fontName:(NSString*)name fontSize:(CGFloat)size; | |
// start rolling up | |
-(void) rollToScore:(int)newScore; | |
// internal stuff | |
-(void) update_; | |
-(void) setup_:(int)score formatString:(NSString *)formatString; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment