FashionShowManager.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class FashionShowManager : Regist
  6. {
  7. #region Config
  8. //StartMark-Used by LabelUtility-Do not remove
  9. //EndMark-Used by LabelUtility-Do not remove
  10. private static Button GardenFashionShowButton;
  11. private static Button DressroomFashionShowButton;
  12. private static Transform FashionShowButtonParent;
  13. private static int UnlockLevel = 21;
  14. #endregion
  15. public override void RegistReference()
  16. {
  17. GardenFashionShowButton = ResourceManager.Get<Button>(CanvasLabel.C_FashionShowButton);
  18. DressroomFashionShowButton = ResourceManager.Get<Button>(CanvasLabel.P_FashionShowButton);
  19. FashionShowButtonParent = ResourceManager.Get(CanvasLabel.C_FashionShowButtonParent);
  20. GardenFashionShowButton.onClick.AddListener(OnGardenFashionShowButtonClick);
  21. DressroomFashionShowButton.onClick.AddListener(OnDressroomFashionShowButtonClick);
  22. Manager.OnLevelChange += OnLevelChange;
  23. }
  24. private static void OnLevelChange(int level)
  25. {
  26. if (level >= UnlockLevel)
  27. {
  28. FashionShowButtonParent.SetActive(true);
  29. }
  30. else
  31. {
  32. FashionShowButtonParent.SetActive(false);
  33. }
  34. }
  35. private static void OnGardenFashionShowButtonClick()
  36. {
  37. }
  38. private static void OnDressroomFashionShowButtonClick()
  39. {
  40. }
  41. }