Interface for services supporting stats and achievements.
More...
Interface for services supporting stats and achievements.
- Version
- 1.23
◆ addStatListener()
Add stats and achievements listener.
- Parameters
-
◆ getStatsAndAchievements()
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().
- Parameters
-
stats | Stats. |
achievements | Achievements. |
listener | If not null called once in addition to added listeners. |
◆ removeStatsListener()
Remove stats and achievements listener.
- Parameters
-
listener | Listener to remove. |
◆ resetAllStats()
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.
- Parameters
-
resetAchievements | Reset also achievements not just stats. |
◆ setStatsAndAchievements()
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().
- Parameters
-
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. |
The documentation for this interface was generated from the following file: