-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kiip_ios.mm
36 lines (30 loc) · 921 Bytes
/
Kiip_ios.mm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*-
* Cross-Platform C++ Wrapper for Kiip
* Designed to work with iOS and Android Kiip libraries
* http://kiip.me
*
* Created by Brady Archambo (in no way affiliated with Kiip)
*
* Find me on Twitter, twitter.com/bradyy
*
*/
#import "Kiip_ios.h"
#import "Kiip.h"
KiipWrapper* KiipWrapper::m_spKiipWrapper = NULL;
KiipWrapper* KiipWrapper::sharedKiipWrapper()
{
if (m_spKiipWrapper == NULL) {
m_spKiipWrapper = new KiipWrapper();
}
return m_spKiipWrapper;
}
void KiipWrapper::unlockAchievement(const char * name)
{
NSString *achievementName = [NSString stringWithUTF8String:name];
[[KPManager sharedManager] unlockAchievement:achievementName];
}
void KiipWrapper::reportScoreForLeaderboard(const char * name, double score)
{
NSString *leaderboardName = [NSString stringWithUTF8String:name];
[[KPManager sharedManager] updateScore:score onLeaderboard:leaderboardName];
}