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); } }
public void AddArchievementBadge(ArchievementBadge ab) { playerData.archievementBadges.Add(ab.badgeID); Save(); }