【问题标题】:game center score submission problem游戏中心分数提交问题
【发布时间】:2011-08-13 16:24:30
【问题描述】:

我已经在我的游戏中集成了游戏中心......它运行良好,但我现在遇到了新问题:P 只有一个分数是用户提交的.. 之后没有分数提交,甚至高于或低于发布的分数...... 知道我要做什么... 问候 哈西布

【问题讨论】:

    标签: iphone ios4 iphone-sdk-3.0 ios-simulator cocos2d-iphone


    【解决方案1】:

    我用这个来提交分数......在确定游戏中心可用后......

    NSAutoreleasePool   *pool = [[NSAutoreleasePool alloc]init];
    
        GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:gameCenterCategory] autorelease];
    
        int64_t score1 =socre;
        scoreReporter.value = score1;
        [scoreReporter reportScoreWithCompletionHandler:^(NSError *error) { 
            if (error != nil) {
                NSLog(@"Submit failed");
            }
            else {
                NSLog(@"Score Submited");
            }
        }];
    
        [pool release];
    

    【讨论】:

    • .. 我被选为在游戏中心设置中显示分数的磨损选项 .. 我被选为首先显示最低分数 .. 现在我已经更改 dat 选项现在它运行良好.. tahnx 给你...你能帮我解决这个问题吗...stackoverflow.com/questions/5803522/…
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多