Hello.
I am building a simple game and I want to use your service to create a global leaderboard because this API it's simple and user-friendly, but I got stuck when I wanted to show the users because it's a little complicated on runtime...
Here is my code:
public Leaderboard()
{
App42API.Initialize(Constants.ApiKey, Constants.ApiSecretKey);
scoreBoardService = App42API.BuildScoreBoardService();
scoreBoardService.GetTopNRankers(Constants.gameName, 2, new Callback());
}
public class Callback : App42Callback
{
//CoreWindow window = CoreWindow.GetForCurrentThread();
public void OnSuccess(Object response)
{
try
{
Game game = (Game)response;
for (int i = 0; i < game.GetScoreList().Count; i++)
{
}
}
catch
{
}
}
public void OnException(App42Exception exception)
{
}
}
The problem is that when I wanted for example to show a messagedialog in OnSuccess callback the game got crashed, also for whatever other element TextLabel, ListBox ... I figured out that there is a little more code that has to be written to get the rankings be shown in a listbox, or in a textlabel... So .. what code shall I write to get my rankings shown on a listbox for exemple? :)
Thanks.