using UnityEngine; using UnityEngine.UI; using UniRx; public class HydrantCreationPanel : UIView { public Toggle PostToggle; public Toggle FlushToggle; public Button SaveButton; public Button ClearButton; public override void Awake() { base.Awake(); //地上消火栓 PostToggle.OnValueChangedAsObservable() .Subscribe(value => { EquipmentManager.Instance.Clone("DSXHS", value, 0f); }); //地下消火栓 FlushToggle.OnValueChangedAsObservable() .Subscribe(value => { EquipmentManager.Instance.Clone("DXXHS", value, 0f); }); //清空 ClearButton.OnClickAsObservable() .Subscribe(_ => EquipmentManager.Instance.OnCleraButtonClicked()); //保存 SaveButton.OnClickAsObservable() .Subscribe(_ => EquipmentManager.Instance.SaveData()); transform.Find("TitleBar/CloseButton").GetComponent