Wortal SDK Core - v1.2.0
Table of contents
Variables
Functions
Variables
ads
• Const
ads: ads
= _ads
Ads API
analytics
• Const
analytics: analytics
= _analytics
Analytics API
context
• Const
context: context
= _context
Context API
iap
• Const
iap: iap
= _iap
In-app purchase API
leaderboard
• Const
leaderboard: leaderboard
= _leaderboard
Leaderboard API
player
• Const
player: player
= _player
Player API
session
• Const
session: session
= _session
Session API
Functions
init
▸ init(options?
): void
Initializes the SDK. This is called automatically after the Wortal backend interface script is loaded. There is no need to call this from the game.
Parameters
Name | Type | Description |
---|---|---|
options |
InitializationOptions |
Initialization options to include. Currently not used. |
Returns
void
setLoadingProgress
▸ setLoadingProgress(value
): void
Sets the loading progress value for the game. This is required on some platforms. Failure to call this with 100 once the game is fully loaded will result in the game failing to start.
Example
onGameLoadProgress(percent) {
Wortal.setLoadingProgress(percent);
}
onGameLoaded() {
Wortal.setLoadingProgress(100);
}
Parameters
Name | Type | Description |
---|---|---|
value |
number |
Percentage of loading complete. Range is 0 to 100. |
Returns
void