Skip to content

QUDO

Class in QUDOSDK

Fields

This is a string representation of the current SDK Version
Example
1
2
3
4
5
void Start()
{
    //print the sdk state version on the console
    Debug.Log("QUDO SDK version: " + QUDO.SDK_VERSION);
}
This is a string representation of the current version state of the SDK
Example
1
2
3
4
5
void Start()
{
    //print the sdk version on the console
    Debug.Log("QUDO SDK State version: " + QUDO.SDK_VERSION_STATE);
}
The current state of the game, defined by the developer
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
/*
*Starts the activity report.
*This should be used when the player is playing
*or any other condition where you see fit to report activity.
*/
void StartActivityReport()
{
    QUDO.CurrentGameState = GameState.PLAYING;
}

/*
*Prevents any other increase of the player.
*This should be set when the player is just on the homescreen
*or any other condition where you see fit not reporting activity.
*/
void StopActivityReport()
{
    QUDO.CurrentGameState = GameState.IDLE;
}

Properties

The current state of the SDK requests, this indicates what the SDK is currently doing
Example
1
2
3
4
5
//print to the console the current state of the sdk
void PrintSDKState()
{
    Debug.Log("QUDO SDK state:" + QUDO.State);
}
The status of the SDK initialization
Example
1
2
3
4
5
void CheckIfQUDOIsInitialized()
{
    // Print to the console the state of the SDK initialization
    Debug.Log("Initialized: " + QUDO.Initialized);
}

Methods

This warning is used to tell the user that QUDO rewards will only be accounted for after he logins (any other previous achievement, highscore, won't give any rewards)
Example
1
2
3
4
void WarnReward()
{
    QUDO.DisplayRewardWarning();
}
Opens the Login/Register window of QUDO, this method uses delegates to return a QUDOUser in case the user logs in
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//Store the logged in user in this variable, or any other place you want
QUDOUser currentUser;

//Opens the QUDO login window and prompts the user for a login or register
void OpenQUDOLoginWindow()
{
    QUDO.OpenLoginWindow((QUDOUser user) =>
    {
        if(user != null)
        {
            /*
            * If the login was successfull you will receive
            * the user has a return and you will be able to store it
            * wherever you want on your code
            */
            Debug.Log($"{user.Username} has logged in!");
            //Store this user
            currentUser = user;
        }
        else
        {
            /*
            *The user can always close the login window or register
            *if that happens the user variable will be null
            */
            Debug.Log("No login done!");
        }
    });
}
Initializes the SDK so that the developer can check his game's products, achievements, highscores and leaderboards without anyone logging in
Example
1
2
3
4
5
// Initializes the QUDO SDK
void InitializeQUDOSDK()
{
    QUDO.Initialize();
}

Events

Event triggered when the SDK is initialized
Example
1
2
3
4
5
6
7
8
void Start()
{
    // Print to the console once the SDK is initialized
    QUDO.OnInitialized += () =>
    {
        Debug.Log("QUDO SDK Initialized!");
    }
}