public void UpdateProgressDisplay(IceAttribute attribute) { iceDelivered.Add(attribute); if (progressPoints > goal_Gold) { progressPoints += attribute.scale; return; } progressPoints += attribute.scale; slider.sizeDelta = new Vector2(x_max * (progressPoints > goal_Gold ? 1 : progressPoints / goal_Gold), slider.sizeDelta.y); slider.anchoredPosition = new Vector2(slider.sizeDelta.x / 2, 0); if (!bronzeWin && progressPoints >= goal_Bronze) { bronzeWin = true; StartCoroutine(ShowTrophy(Troph_Bronze)); } if (!silverWin && progressPoints >= goal_Silver) { silverWin = true; StartCoroutine(ShowTrophy(Troph_Silver)); } if (!goldWin && progressPoints >= goal_Gold) { goldWin = true; StartCoroutine(ShowTrophy(Troph_Gold)); } if (progressPoints >= goal_Gold) { menu.ChangeWinLoseMenu(true); } }