예제 #1
0
    void RemoveUsedArchievements()
    {
        var usedArchievements = Main.instance.score.playerData.archievementBadges;

        List <GameObject> treeList = new List <GameObject>();

        foreach (int tempID in usedArchievements)
        {
            foreach (GameObject tempArchievement in archievements)
            {
                ArchievementBadge tempBadge = tempArchievement.GetComponent <ArchievementBadge>();
                if (tempBadge.badgeID == tempID)
                {
                    treeList.Add(tempArchievement);
                }
            }
        }

        foreach (GameObject tempGo in treeList)
        {
            archievements.Remove(tempGo);
        }
    }
예제 #2
0
 public void AddArchievementBadge(ArchievementBadge ab)
 {
     playerData.archievementBadges.Add(ab.badgeID);
     Save();
 }