public Achievement(AchievementTypes _achievementType, int _maxValue, int __value = 0, OnAchievementsDelegate callback = null) { achievementType = _achievementType; maxValue = _maxValue; value = __value; OnAchievement = callback; }
public void LoadAchievement() { OnAchievementsDelegate del = GameManager.instance.OnAchievementsDelegate; int pickupCount = Enum.GetValues(typeof(PickUpType)).Length; // 7 achievements[AchievementTypes.ScrapSlayer] = new Achievement(AchievementTypes.ScrapSlayer, 100, achievementSave.scrapSlayer, del); achievements[AchievementTypes.MasterOfTheSkies] = new Achievement(AchievementTypes.MasterOfTheSkies, 250, achievementSave.masterOfTheSkies, del); achievements[AchievementTypes.FullyEquipped] = new Achievement(AchievementTypes.FullyEquipped, pickupCount, achievementSave.fullyEquipped.Count, del); //achievements[AchievementTypes.ProtonBlaster] = new Achievement(AchievementTypes.ProtonBlaster, 50, achievementSave.protonBlaster, del); achievements[AchievementTypes.DownToEarth] = new Achievement(AchievementTypes.DownToEarth, 1, achievementSave.downToEarth, del); achievements[AchievementTypes.DieHard] = new Achievement(AchievementTypes.DieHard, 1, achievementSave.dieHard, del); achievements[AchievementTypes.Invincible] = new Achievement(AchievementTypes.Invincible, 1, achievementSave.invincible, del); //achievements[AchievementTypes.OverAchiever] = new Achievement(AchievementTypes.OverAchiever, 7, achievementSave.overAchiever, del); }