Drag[en]gine Script Module DragonScript
1.23
|
Service providing access to Steam SDK functionality if supported. More...
Classes | |
class | InitParameters |
Service initialization parameters. More... | |
Public Member Functions | |
void | addStatListener (ServiceStatsListener listener) |
Add stats and achievements listener. More... | |
void | dispose () |
Dispose of Steam SDK service. More... | |
void | getAuthToken (ServiceUserListener listener) |
Request authentification token. More... | |
BaseServiceConversions | getConversions () |
Conversion helper. More... | |
void | getStatsAndAchievements (Set stats, Set achievements, ServiceStatsListener listener) |
Get stats and achievements. More... | |
ServiceUserFeatures | getUserFeatures () |
Features supported by this service. More... | |
void | getUserInfo (ServiceUserListener listener) |
Retrieve user information. More... | |
void | getUserWalletBalance (ServiceUserListener listener) |
Retrieve user wallet balance. More... | |
void | loginUser (ServiceUserCredentials credentials, ServiceUserListener listener) |
Log in user. More... | |
ServiceSteam | new (InitParameters params) |
Create service ServiceSteamSdk. More... | |
void | removeStatsListener (ServiceStatsListener listener) |
Remove stats and achievements listener. More... | |
void | removeUserListener (ServiceUserListener listener) |
Remove user listener. More... | |
void | requestResponse (Service service, UniqueID id, ServiceObject response, bool finished) |
Response received for request. More... | |
void | setStatsAndAchievements (Dictionary stats, Dictionary achievements, ServiceStatsListener listener) |
Set stats and achievements. More... | |
Public Member Functions inherited from Dragengine.Services.Stats.ServiceStats | |
void | resetAllStats (bool resetAchievements) |
Reset all stats on service provider. More... | |
Public Member Functions inherited from Dragengine.Services.User.ServiceUser | |
void | addUserListener (ServiceUserListener listener) |
Add user listener. More... | |
bool | isUserLoggedIn () |
User is logged in. More... | |
void | loadUserResource (String url, ServiceUserListener listener) |
Load resource asynchronously. More... | |
void | logoutUser (ServiceUserListener listener) |
Log out user. More... | |
void | reportUser (String id, ServiceUserReport report, ServiceUserListener listener) |
Report user. More... | |
Public Member Functions inherited from Dragengine.ServiceListener | |
void | eventReceived (Service service, ServiceObject event) |
Service event received for example notifications. More... | |
void | requestFailed (Service service, UniqueID id, ServiceObject error) |
Request failed. More... | |
Static Public Member Functions | |
static bool | isServiceSupported () |
Checks if Steam SDK service is supported. More... | |
Public Attributes | |
BaseServiceConversions | pConversions |
Set | pGetStatsApiNames |
InitParameters | pInitParameters |
Dictionary | pOnceListeners |
Service | pService |
Set | pSetStatsApiNames |
SafeArray | pStatsListeners |
Static Public Attributes | |
static final String | authProviderId = "steam" |
Authentification provider identifier. More... | |
Service providing access to Steam SDK functionality if supported.
Provides access to these functionalities:
void Dragengine.Services.ServiceSteam.addStatListener | ( | ServiceStatsListener | listener | ) |
Add stats and achievements listener.
listener | Listener to add |
Implements Dragengine.Services.Stats.ServiceStats.
void Dragengine.Services.ServiceSteam.dispose | ( | ) |
Dispose of Steam SDK service.
void Dragengine.Services.ServiceSteam.getAuthToken | ( | ServiceUserListener | listener | ) |
Request authentification token.
Requests an encrypted appplication ticket. If one is cached it is returned. The received ticket is Base64 encoded.
listener | If not null called once in addition to added listeners. |
Implements Dragengine.Services.User.ServiceUser.
BaseServiceConversions Dragengine.Services.ServiceSteam.getConversions | ( | ) |
Conversion helper.
void Dragengine.Services.ServiceSteam.getStatsAndAchievements | ( | Set | stats, |
Set | achievements, | ||
ServiceStatsListener | listener | ||
) |
Get stats and achievements.
Requests from the service provider the set of stats and achievements with the matching api names. Once retrieved calls ServiceStatsListener::onGetStats().
stats | Stats. |
achievements | Achievements. |
listener | If not null called once in addition to added listeners. |
Implements Dragengine.Services.Stats.ServiceStats.
ServiceUserFeatures Dragengine.Services.ServiceSteam.getUserFeatures | ( | ) |
Features supported by this service.
Implements Dragengine.Services.User.ServiceUser.
void Dragengine.Services.ServiceSteam.getUserInfo | ( | ServiceUserListener | listener | ) |
Retrieve user information.
listener | If not null called once in addition to added listeners. |
Implements Dragengine.Services.User.ServiceUser.
void Dragengine.Services.ServiceSteam.getUserWalletBalance | ( | ServiceUserListener | listener | ) |
Retrieve user wallet balance.
Can be used if ServiceUserFeatures::hasMarketplace is true.
listener | If not null called once in addition to added listeners. |
Implements Dragengine.Services.User.ServiceUser.
|
static |
void Dragengine.Services.ServiceSteam.loginUser | ( | ServiceUserCredentials | credentials, |
ServiceUserListener | listener | ||
) |
Log in user.
User can be logged in automatically or manually.
Automatic logging in is used for example Steam where the user has to log into the platform before the game can be launched. Automatic logging in can trigger platform specific log in procedure and terms acknowledge process. Typically this has to be done once and then logging in is automatic.
Manual logging in requires the game to obtain the credentials from the user. This can be useful for developers to not enter credentials each time they launch the game. Production games usually do not require manual logging in unless the service in question does not support automatic logging in.
Manual logging in is also possible using authentification tokens from other services. For example a user can log into certain services using his Steam user account. See ServiceUserFeatures::canAuthProviderLogin obtained from getUserFeatures() to know which other services are supported for manual login using auth tokens.
Once logging in finished ServiceUserListener::onLoginUser() is called.
credentials | Credentials for manual logging in. Use null for automatic logging in. |
listener | If not null called once in addition to added listeners. |
Implements Dragengine.Services.User.ServiceUser.
ServiceSteam Dragengine.Services.ServiceSteam.new | ( | InitParameters | params | ) |
Create service ServiceSteamSdk.
params | Init parameters. |
EInvalidParam | Steam service module is not present. |
EInvalidAction | Steam is not running. |
EInvalidAction | Steam SDK can not be initialized. |
void Dragengine.Services.ServiceSteam.removeStatsListener | ( | ServiceStatsListener | listener | ) |
Remove stats and achievements listener.
listener | Listener to remove. |
Implements Dragengine.Services.Stats.ServiceStats.
void Dragengine.Services.ServiceSteam.removeUserListener | ( | ServiceUserListener | listener | ) |
Remove user listener.
listener | Listener to remove. |
Implements Dragengine.Services.User.ServiceUser.
void Dragengine.Services.ServiceSteam.requestResponse | ( | Service | service, |
UniqueID | id, | ||
ServiceObject | response, | ||
bool | finished | ||
) |
Response received for request.
service | Service receiving the response. |
id | Identifier of request this response belongs to. |
response | Response data. |
finished | True if the request finished or false if more responses will be received. |
Implements Dragengine.ServiceListener.
void Dragengine.Services.ServiceSteam.setStatsAndAchievements | ( | Dictionary | stats, |
Dictionary | achievements, | ||
ServiceStatsListener | listener | ||
) |
Set stats and achievements.
Stores stats and achievements to service provider. Once stored calls ServiceStatsListener::onSetStats().
stats | Dictionary of stats to store. Key is api name as String. Values is either an int or float value depending on the stat type. |
achievements | Dictionary of achievements to store. Key is api name as String. Value is true or false to set or clear the achievement. |
listener | If not null called once in addition to added listeners. |
Implements Dragengine.Services.Stats.ServiceStats.
|
static |
Authentification provider identifier.
BaseServiceConversions Dragengine.Services.ServiceSteam.pConversions |
Set Dragengine.Services.ServiceSteam.pGetStatsApiNames |
InitParameters Dragengine.Services.ServiceSteam.pInitParameters |
Dictionary Dragengine.Services.ServiceSteam.pOnceListeners |
Service Dragengine.Services.ServiceSteam.pService |
Set Dragengine.Services.ServiceSteam.pSetStatsApiNames |
SafeArray Dragengine.Services.ServiceSteam.pStatsListeners |