Beispiel #1
0
    static public void AnnounceAchievementCompletion(Achievement ach)
    {
        ShipCustomizationPanel.UnlockPart(ach.partType, ach.partNum);

        string desc = ach.description.Replace("#", ach.stepCount.ToString("N0"));

        S.TriggerPopUp(ach.name, desc);
    }
Beispiel #2
0
 void UnlockPartsAfterLoadingGame()
 {
     foreach (Achievement ach in achievements)
     {
         if (ach.complete)
         {
             ShipCustomizationPanel.UnlockPart(ach.partType, ach.partNum);
         }
         else
         {
             ShipCustomizationPanel.LockPart(ach.partType, ach.partNum);
         }
     }
 }
 void UnlockAchievement(int achievementNumberInList)
 {
     if (achievementNumberInList == -1)
     {
         achievementNameDisplay.text        = "HIGH SCORE";
         achievementDescriptionDisplay.text = "You've achieved a new high score.";
     }
     else
     {
         achievementNameDisplay.text        = Achievements[achievementNumberInList].name;
         achievementDescriptionDisplay.text = Achievements[achievementNumberInList].description;
         ShipCustomizationPanel.UnlockPart(Achievements[achievementNumberInList].partType, Achievements[achievementNumberInList].partNum);
         CustomAnalytics.SendAchievementUnlocked(Achievements[achievementNumberInList]);
     }
     anim.SetBool("Achievement appear", true);
     Invoke("AchievementDisappear", durationOfShowingAchievement);
     SaveGameManager.Save();
 }