ObjectiveMetNotification.cs 545 B

1234567891011121314151617181920212223
  1. using UnityEngine;
  2. using System.Collections;
  3. public class ObjectiveMetNotification : ScreenBase
  4. {
  5. public LevelObjectiveUI objectiveUI;
  6. public void ShowObjectiveMet(LevelObjective levelObjective)
  7. {
  8. objectiveUI.SetObjective(levelObjective);
  9. objectiveUI.SetComplete(playSound:true);
  10. string objectivePrefix = string.Empty;
  11. string objectiveSuffix = "/"+objectiveUI.Target;
  12. objectiveUI.SetProgressValue(objectiveUI.Actual, objectivePrefix, objectiveSuffix);
  13. }
  14. public override void Show()
  15. {
  16. base.Show();
  17. Invoke("Hide", 2);
  18. }
  19. }