public void EndOfGame() { var score = _points / 10; var success = !(score < 6); if (success) { ProgressManager.Instance.Reward(CommonResources.Building.EbuTalib, score * 50); if (score == 10) { ProgressManager.Instance.UnlockAchievement(CommonResources.Extras(CommonResources.Building.EbuTalib), 250); } } Invoke("Back", 2); }
private void EndOfGame(bool success) { if (success) { var duties = CommonResources.DutyOf(ScoreManager.Instance.Level); var reward = duties.Find(duty => duty.Building == CommonResources.Building.Omer).Reward; if (!AchievementsManager.Instance.IsAchieved(reward)) { var timer = Time.time - _start; ProgressManager.Instance.Reward(CommonResources.Building.Omer, (int)(_score * 50 - (timer / 10))); } // Bonus var bonus = CommonResources.Extras(CommonResources.Building.Omer); if (_score > 8 && !AchievementsManager.Instance.IsAchieved(bonus)) { ProgressManager.Instance.UnlockAchievement(bonus, 250); } } Invoke("Back", 3); }