Drag[en]gine Script Module DragonScript
1.23
|
Interface for services supporting stats and achievements. More...
Public Member Functions | |
void | addStatListener (ServiceStatsListener listener) |
Add stats and achievements listener. More... | |
void | getStatsAndAchievements (Set stats, Set achievements, ServiceStatsListener listener) |
Get stats and achievements. More... | |
void | removeStatsListener (ServiceStatsListener listener) |
Remove stats and achievements listener. More... | |
void | resetAllStats (bool resetAchievements) |
Reset all stats on service provider. More... | |
void | setStatsAndAchievements (Dictionary stats, Dictionary achievements, ServiceStatsListener listener) |
Set stats and achievements. More... | |
Interface for services supporting stats and achievements.
void Dragengine.Services.Stats.ServiceStats.addStatListener | ( | ServiceStatsListener | listener | ) |
Add stats and achievements listener.
listener | Listener to add |
Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, and Dragengine.Services.ServiceEos.
void Dragengine.Services.Stats.ServiceStats.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. |
Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, and Dragengine.Services.ServiceEos.
void Dragengine.Services.Stats.ServiceStats.removeStatsListener | ( | ServiceStatsListener | listener | ) |
Remove stats and achievements listener.
listener | Listener to remove. |
Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, and Dragengine.Services.ServiceEos.
void Dragengine.Services.Stats.ServiceStats.resetAllStats | ( | bool | resetAchievements | ) |
Reset all stats on service provider.
This is mainly for development purpose to test stats and achievements. For this reason this call does not send events to listeners.
resetAchievements | Reset also achievements not just stats. |
void Dragengine.Services.Stats.ServiceStats.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. |
Implemented in Dragengine.Services.ServiceSteam.