Example Achievement Function

PHOTO EMBED

Thu May 16 2024 13:17:41 GMT+0000 (Coordinated Universal Time)

Saved by @jakebezz

 private void PlayRound()
 {
     //Prevents Other Games Activating Achievement
     if (PlayerData.Instance.CurrentGame != CasinoGames.Blackjack) { return; }

     roundsPlayed.UpdateAchievement(1, roundsPlayedText);
     
     if (roundsPlayed.HasUnlocked)
     {
         achievementManager.AchivementUnlocked(roundsPlayed);
         BlackJackManager.OnStartPlayerTurn -= PlayRound;
     }
 }
content_copyCOPY

This is an example of a function that is added to a Static Event to update and achievement when the event is called.