2. UpdateScore Event

WinZO requires score to be updated via the WinzoScoreTracker and hence asks for an UpdateScore event to be triggered.

Now for Updating Scores, we have 4 different variations of the UpdateScore() method.

  1. For Single Player game: Please use this variant

WinzoScoreTracker.UpdateScore(score, expectedScore) 
  1. For Multiplayer game: If you display the score of a local or opponent player on your UI then you should use this function.

    You need to send updatedScore for all the players with their Ids. Please use this variant :

WinzoScoreTracker.UpdateScore(playerId, score, expectedScore)

You will get the playerId and opponentId in the game config.

score: It is the updated current score of the player in the game.

expectedScore : It is the delta score that is changed in the current move.

How to Use:

public void UpdateScore()
   {
       WinzoScoreTracker.UpdateScore(score, expectedScore);
   }

For example, If player A has currentScore = 5, and Player A collects a coin in the game worth 10 points, then new currentScore = 15 and expectedScore = 10 (which is the delta score)

WinzoScoreTracker.UpdateScore(15, 10)

Last updated