HideLevelThree.cs 586 B

12345678910111213141516171819202122232425262728
  1. using Blue;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. using UnityEngine.UI;
  6. public class HideLevelThree : MonoBehaviour, IController
  7. {
  8. private IQueueSystem mQueueSystem;
  9. public Toggle hideTog;
  10. private void Start()
  11. {
  12. mQueueSystem = this.GetService<IQueueSystem>();
  13. hideTog.onValueChanged.AddListener((state) =>
  14. {
  15. HideL3(state);
  16. });
  17. }
  18. public void HideL3(bool on)
  19. {
  20. foreach (var go in mQueueSystem.Level3List)
  21. {
  22. go.SetActive(!on);
  23. }
  24. }
  25. }