Game

Report On Game Complete

It will increment the current level and reward currency added in API Call. In the API response it contains GameProgress data and the user's currencies list.
using ReadyGamesNetwork.RGN;
using ReadyGamesNetwork.RGN.Model;
using ReadyGamesNetwork.RGN.Modules;
​
public async void OnGameComplete()
{
GameModule gameModule = RGNCoreBuilder.I.GetModule<GameModule>();
​
RGNOnGameCompleteResult onGameCompleteResult = await gameModule.OnGameComplete(new List<RGNCurrency>()
{
new RGNCurrency()
{
name = "rgntestCoin",
quantity = 25
}
});
​
Debug.Log(quot;gameProgress: {JsonUtility.ToJson(onGameCompleteResult.gameProgress)}\n\r" +
quot;currencies: {JsonUtility.ToJson(onGameCompleteResult.userCurrencies)}");
​
}

Retrieve Game Progress

You need to add a GameModule in Initialisation. Refer Initialise the RGN SDK.
RGNCoreBuilder.AddModule(new StoreModule());
using ReadyGamesNetwork.RGN;
using ReadyGamesNetwork.RGN.Model;
using ReadyGamesNetwork.RGN.Modules;
​
public async void GetGameProgress()
{
GameModule gameModule = RGNCoreBuilder.I.GetModule<GameModule>();
RGNGameProgress gameProgress = await gameModule.GetGameProgress();
}
​

Custom Level Progress

You can store your custom serialized class object in our database.
Copy link
On this page
Report On Game Complete
Retrieve Game Progress
Custom Level Progress