RobotKit API
|
00001 // 00002 // RKAchievement.h 00003 // RobotKit 00004 // 00005 // Created by Jon Carroll on 8/2/11. 00006 // Copyright 2011 Orbotix Inc. All rights reserved. 00007 // 00008 00009 #import <Foundation/Foundation.h> 00010 00034 @interface RKAchievement : NSObject { 00035 NSString *name; 00036 NSString *description; 00037 NSString *img; 00038 int count_required; 00039 float percentComplete; 00040 int points; 00041 } 00042 00046 @property (nonatomic, retain) NSString *name; 00050 @property (nonatomic, retain) NSString *description; 00054 @property (nonatomic, retain) NSString *img; 00058 @property int count_required; 00062 @property float percentComplete; 00066 @property int points; 00067 00072 +(void)recordEvent:(NSString*)name; 00078 +(void)recordEvent:(NSString*)name withCount:(int)count; 00079 00080 @end 00081 00082 //Achievement related notification constants 00086 static NSString * const RKAchievementEarnedNotification = @"RKAchievementEarnedNotification"; 00090 static NSString * const RKAchievementEarnedAchievementKey = @"RKAchievementEarnedAchievementKey"; 00091 00092 //Register for these notifications if you would like to be notified of drive related events for the purpose of achievement tracking. 00093 //Note: These calls will fire quickly and rapidly, distance and time will typically arrive in very small increments. 00097 static NSString * const RKDriveTimeNotification = @"RKDriveTimeNotification"; 00101 static NSString * const RKDriveDistanceNotification = @"RKDriveDistanceNotification"; 00105 static NSString * const RKDriveColorChangeNotification = @"RKDriveColorChangeNotification"; 00109 static NSString * const RKDriveStatValueKey = @"RKDriveStatValueKey";