2011년 8월 17일 수요일

[Cocoslive] How to Post score to the cocoslive server

Try the following then you will find no problem with it!

Have fun~ :p

#import "CLScoreServerPost.h"

 

-(void) postScore:(NSString*)userName{
    CLScoreServerPost *server = [[CLScoreServerPost alloc]initWithGameName:@"Mayday Timeattack" gameKey:@"game key from cocoslive"delegate:self];
    
NSMutableDictionary *dict = [NSMutableDictionarydictionaryWithCapacity:3];
[dict setObject: [NSNumber numberWithInt:(int)(totalTime*100)]forKey:@"cc_score"];
[dict setObject:userName forKey:@"cc_playername"];
    
[server updateScore:dict];
}

-(void) scorePostOk: (id) sender
{

}

-(void) scorePostFail: (id) sender
{

}

댓글 1개: