![]() |
CloudBuilder C++ SDK
v3.0.0
Making social games is easy !
|
#include <CGameManager.h>
Public Member Functions | |
void | Score (long long aHighScore, const char *aMode, const char *aScoreType, const char *aInfoScore, bool aForce, const char *aDomain, CResultHandler *aHandler) |
void | GetRank (long long aHighScore, const char *aMode, const char *aDomain, CResultHandler *aHandler) |
void | BestHighScore (int aCount, int aPage, const char *aMode, const char *aDomain, CResultHandler *aHandler) |
void | CenteredScore (int aCount, const char *aMode, const char *aDomain, CResultHandler *aHandler) |
void | UserBestScores (const char *aDomain, CResultHandler *aHandler) |
void | GetValue (const CotCHelpers::CHJSON *aConfiguration, CResultHandler *aHandler) |
void | GetBinary (const CotCHelpers::CHJSON *aConfiguration, CResultHandler *aHandler) |
void | Batch (CResultHandler *aHandler, const CotCHelpers::CHJSON *aConfiguration, const CotCHelpers::CHJSON *aParameters) |
DEPRECATED void | Score (CResultHandler *aHandler, long long aHighScore, const char *aMode, const char *aScoreType, const char *aInfoScore, bool aForce, const char *aDomain="private") |
DEPRECATED void | GetRank (CResultHandler *aHandler, long long aHighScore, const char *aMode, const char *aDomain="private") |
DEPRECATED void | BestHighScore (CResultHandler *aHandler, int aCount, int aPage, const char *aMode, const char *aDomain="private") |
DEPRECATED void | CenteredScore (CResultHandler *aHandler, int aCount, const char *aMode, const char *aDomain="private") |
DEPRECATED void | UserBestScores (CResultHandler *aHandler, const char *aDomain="private") |
DEPRECATED void | BinaryRead (const CotCHelpers::CHJSON *aConfiguration, CResultHandler *aHandler) |
DEPRECATED void | KeyValueRead (const CotCHelpers::CHJSON *aConfiguration, CResultHandler *aHandler) |
Static Public Member Functions | |
static CGameManager * | Instance () |
Friends | |
class | CClan |
struct | singleton_holder< CGameManager > |
The CGameManager class is helpful when you want to store global data for your application. These data will be accessible to all users who have installed and are using this application. It can be useful for introducing new levels, new assets, or anything that you wish to add to the application in future updates. It also provides helper methods to store and retrieve high scores.
void CloudBuilder::CGameManager::Batch | ( | CResultHandler * | aHandler, |
const CotCHelpers::CHJSON * | aConfiguration, | ||
const CotCHelpers::CHJSON * | aParameters | ||
) |
Run a batch on the server side. Batch is edited on BackOffice server.
aConfiguration | JSON data describing the dat to pass to the batch
|
aParameters | JSON data describing the data to pass to the batch
|
aHandler | the handler called with the result when the call completes |
void CloudBuilder::CGameManager::BestHighScore | ( | int | aCount, |
int | aPage, | ||
const char * | aMode, | ||
const char * | aDomain, | ||
CResultHandler * | aHandler | ||
) |
Method used to retrieve the best High Scores for this application.
aCount | is the number of best scores you want to retrieve, default is 10 |
aPage | is the number of the page to retrieve. the default is 1 |
aMode | is a C string holding the game mode for which you want to retrieve the best High Scores. |
aDomain | is the domain in which the best scores have to be retrieved. "private" means it's local to this game only. |
aHandler | result handler whenever the call finishes (it might also be synchronous) |
void CloudBuilder::CGameManager::CenteredScore | ( | int | aCount, |
const char * | aMode, | ||
const char * | aDomain, | ||
CResultHandler * | aHandler | ||
) |
Method used to retrieve scores centered on the user score for this application.
aCount | is the number of best scores you want to retrieve, default is 10 |
aMode | is a C string holding the game mode for which you want to retrieve the best High Scores. |
aDomain | is the domain in which the best scores have to be retrieved. "private" means it's local to this game only. |
aHandler | result handler whenever the call finishes (it might also be synchronous) |
void CloudBuilder::CGameManager::GetBinary | ( | const CotCHelpers::CHJSON * | aConfiguration, |
CResultHandler * | aHandler | ||
) |
Method to read a single key containing binary data stored for this domain.
aConfiguration | JSON allowing for extensible configuration, that may contain:
|
aHandler | result handler whenever the call finishes (it might also be synchronous) |
void CloudBuilder::CGameManager::GetRank | ( | long long | aHighScore, |
const char * | aMode, | ||
const char * | aDomain, | ||
CResultHandler * | aHandler | ||
) |
Method used to retrieve the rank of a High Score for this application.
aHighScore | is the score whose rank you want to retrieve. |
aMode | is a C string holding the game mode for which you want to retrieve rank for this score. |
aDomain | is the domain in which the rank has to be retrieved. "private" means it's local to this game only. |
aHandler | result handler whenever the call finishes (it might also be synchronous) |
void CloudBuilder::CGameManager::GetValue | ( | const CotCHelpers::CHJSON * | aConfiguration, |
CResultHandler * | aHandler | ||
) |
Method to get a single key of the global JSON object stored for this game and domain.
aConfiguration | is a JSON configuration, that may contain
|
aHandler | result handler whenever the call finishes (it might also be synchronous) |
|
static |
Use this method to obtain a reference to the CGameManager.
void CloudBuilder::CGameManager::Score | ( | long long | aHighScore, |
const char * | aMode, | ||
const char * | aScoreType, | ||
const char * | aInfoScore, | ||
bool | aForce, | ||
const char * | aDomain, | ||
CResultHandler * | aHandler | ||
) |
Method used to post a High Score for this application.
aHighScore | is the score you want to post. |
aMode | is a C string holding the game mode for which this score should be considered. |
aScoreType | string with "hightolow" or "lowtohigh" |
aInfoScore | is an optional string wich describe the score |
aForce | is an optional boolean used in case we authorize the new high score to be inferior to the previous one. |
aDomain | is the domain in which the score has to be pushed. "private" means it's local to this game only. |
aHandler | result handler whenever the call finishes (it might also be synchronous) |
done
means that the score has been recorded as the highest, while rank
is the effective rank of the player (returned even if the player has not actually been classed, that is if done
is 0). void CloudBuilder::CGameManager::UserBestScores | ( | const char * | aDomain, |
CResultHandler * | aHandler | ||
) |
Method used to retrieve the best Scores of the logged user.
aDomain | is the domain in which the best scores have to be retrieved. "private" means it's local to this game only. |
aHandler | result handler whenever the call finishes (it might also be synchronous) |