iOS
Android
Unity
REST Api
BDArenaAchievements

Availability : ver 1.0 and later

Declared in : BDArenaAchievements.h

Sample code : -

Overview

The BDArenaAchievements class is the main interface for accessing the methods for retrieving and assigning achievements.

 

The BDArenaAchievements object is accessible through achievementsConnector property of the unique BDArenaConnector instance. 

 

 

    BDArenaConnector* arenaConnector = [BDArenaConnector getInstance];    

    BDArenaAchievements* achievementsConnector = arenaConnector.achievementsConnector; 

 

 

Methods

Operations 

- loadAchievements

- reportAchievement:withPercentComplete:

 


 

 

 

loadAchievements

 

Retrieves the list of available achievements.

 

- (void) loadAchievements;

 

Discussion

The results of this operation can be handled implementing 

arenaAchievements:loadAchievementsSuccessfullyCompletedWithArray: and arenaAchievements:loadAchievementsDidFailWithError: 

protocol methods of BDArenaAchievementsDelegate.

 

Availability

available in SDK ver 1.0 and later

 

Declared in

BDArenaAchievements.h

 

 

 

reportAchievement:withPercentComplete:

 

Sets a percent complete to a specific achievement for local player.

 

- (void) reportAchievement:(NSInteger)achievementId

        withPercentComplete:(CGFloat)percentComplete;

 

Parameters 

achievementId

    The achievement identifier. 

percentComplete

    The percentage of completion for the obtaining of the achievement.

 

Discussion

In order to obtain all the available achievements identifiers, the developer must

call loadAchievements.

The results of this operation can be handled implementing 

arenaAchievements:reportAchievementSuccessfullyCompletedWithData: and 

arenaAchievements:reportAchievementDidFailWithError: protocol methods

of BDArenaAchievementsDelegate.

Note that if the developer runs the application in SANDBOX environment,

the achievement's completion percentage reported is not actually saved 

even if this call is successfully performed.

 

Availability

available in SDK ver 1.0 and later

 

Declared in

BDArenaAchievements.h