IAchievementService interface


Provides methods managing user achievements.
Note: User has to be authenticated before executing methods from IAchievementService.

public interface IAchievementService

Methods

Increment achievement

Updates the progress of achievement by incrementing current value.

  • shortcode: Unique identifier for achievement.
  • value: The value to increment progress. Note: Achievement progress for user can be incremented only if achievement is defined as incremental.
AchievementStateResult Increment(string shortCode, int value)

Set achievement value

Updates the progress of achievement by directly setting value. Achievement will keep only the higher value.
Once when the value is higher than the Unlock value, that achievement will become unlocked for the current user.

  • shortcode: Unique identifier for achievement.
  • value: The new value for user achievement status.

Note: Achievement value for user can be updated this way only if achievement is NOT defined as incremental.

AchievementStateResult SetValue(string shortCode, int value)

Reveal achievement

Reveal achievement for the currently authenticated player.

  • shortcode: Unique identifier for achievement.
AchievementStateResult Reveal(string shortCode)

Unlock achievement

Unlock achievement for the currently authenticated player.

AchievementStateResult Unlock(string shortCode)

List achievements

List achievement progress for current authenticated user using UserAchievementQuery

CollectionResult<AchievementResult> List(UserAchievementQuery query)

Get achievement statistics

Get achievement statistic for current authenticated user.
This method returns total number of achievements with number of achieved, revealed and hidden.

AchievementStatistics GetStatistics()

results matching ""

    No results matching ""