Streaks
Read more about the Streak system in Hiro here.
Initializing the streaks system #
The streaks system relies on the Nakama System and an ILogger, both must be passed in as dependencies via the constructor.
 |  | 
Subscribing to changes in the streaks system #
You can listen for changes in the streak system so that you can respond appropriately, such as updating the UI, by implementing the IObserver pattern, or use the SystemObserver<T> type which handles it for you.
 |  | 
Refreshing the streaks system #
To ensure the streaks system has the latest information from Nakama you can refresh it.
 |  | 
Listing streaks #
You can list the current streaks for the user:
 |  | 
Claiming Streaks Rewards #
Players can claim streak rewards using the ClaimAsync method, passing the streak IDs.
 |  | 
Resetting Streaks #
To reset specific streaks for a player, use the ResetAsync method:
 |  | 
Updating Streaks #
You can manually update streaks for a player by passing a dictionary of streak names and new values:
 |  | 
