Drag[en]gine Script Module DragonScript  1.23
Dragengine.Services.Stats.ServiceStats Interface Reference

Interface for services supporting stats and achievements. More...

Inheritance diagram for Dragengine.Services.Stats.ServiceStats:
Dragengine.Services.ServiceEos Dragengine.Services.ServiceMsgdk Dragengine.Services.ServiceSteam

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...
 

Detailed Description

Interface for services supporting stats and achievements.

Version
1.23

Member Function Documentation

◆ addStatListener()

void Dragengine.Services.Stats.ServiceStats.addStatListener ( ServiceStatsListener  listener)

Add stats and achievements listener.

Parameters
listenerListener to add

Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, and Dragengine.Services.ServiceEos.

◆ 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
statsStats.
achievementsAchievements.
listenerIf not null called once in addition to added listeners.

Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, and Dragengine.Services.ServiceEos.

◆ removeStatsListener()

void Dragengine.Services.Stats.ServiceStats.removeStatsListener ( ServiceStatsListener  listener)

Remove stats and achievements listener.

Parameters
listenerListener to remove.

Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, and Dragengine.Services.ServiceEos.

◆ 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
resetAchievementsReset 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
statsDictionary of stats to store. Key is api name as String. Values is either an int or float value depending on the stat type.
achievementsDictionary of achievements to store. Key is api name as String. Value is true or false to set or clear the achievement.
listenerIf not null called once in addition to added listeners.

Implemented in Dragengine.Services.ServiceSteam.


The documentation for this interface was generated from the following file: