using UnityEngine; using UnityEngine.UI; using UniRx; public class PlottingTablesPanel : UIView { //组织指挥架构表 public Toggle StructureToggle; //联动力量表 public Toggle LinkageForceToggle; //联勤保障表 public Toggle SupportToggle; public override void Awake() { base.Awake(); //组织指挥架构表 StructureToggle.OnValueChangedAsObservable() .Subscribe(value => { if (value) UIManager.Instance.Show(); else UIManager.Instance.Hide(); }); //联动力量表 LinkageForceToggle.OnValueChangedAsObservable() .Subscribe(value => { if (value) UIManager.Instance.Show(); else UIManager.Instance.Hide(); }); //联勤保障表 SupportToggle.OnValueChangedAsObservable() .Subscribe(value => { if (value) UIManager.Instance.Show(); else UIManager.Instance.Hide(); }); } public override void Hide() { base.Hide(); StructureToggle.isOn = false; LinkageForceToggle.isOn = false; SupportToggle.isOn = false; } }