|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
using UniRx;
|
|
|
|
|
|
|
|
public class WaterSystemMenuPanel : UIView
|
|
|
|
{
|
|
|
|
public Toggle PumpRoomToggle;
|
|
|
|
public Toggle SXToggle;
|
|
|
|
public Toggle PLBToggle;
|
|
|
|
public Toggle IndoorHydrantToggle;
|
|
|
|
public Toggle PumpAdapterToggle;
|
|
|
|
public Toggle OutdoorHydrantToggle;
|
|
|
|
public Toggle DiagramToggle;
|
|
|
|
public override void Awake()
|
|
|
|
{
|
|
|
|
base.Awake();
|
|
|
|
//泵房水箱
|
|
|
|
PumpRoomToggle.OnValueChangedAsObservable()
|
|
|
|
.Subscribe(Value => MainMenu.Instance.OnPumpRoom(Value));
|
|
|
|
//水泵
|
|
|
|
SXToggle.OnValueChangedAsObservable()
|
|
|
|
.Subscribe(Value => MainMenu.Instance.OnPumpRoom(Value));
|
|
|
|
//喷淋泵
|
|
|
|
PLBToggle.OnValueChangedAsObservable()
|
|
|
|
.Subscribe(Value => MainMenu.Instance.OnPumpRoom(Value));
|
|
|
|
//室内消火栓
|
|
|
|
IndoorHydrantToggle.OnValueChangedAsObservable()
|
|
|
|
.Subscribe(Value => MainMenu.Instance.OnIndoorHydrant(Value));
|
|
|
|
//水泵接合器
|
|
|
|
PumpAdapterToggle.OnValueChangedAsObservable()
|
|
|
|
.Subscribe(Value => MainMenu.Instance.OnSiameseConnection(Value));
|
|
|
|
//室外消火栓
|
|
|
|
OutdoorHydrantToggle.OnValueChangedAsObservable()
|
|
|
|
.Subscribe(Value => MainMenu.Instance.OnOutdoorHydrant(Value));
|
|
|
|
//供水关系图
|
|
|
|
DiagramToggle.OnValueChangedAsObservable()
|
|
|
|
.Subscribe(value => MainMenu.Instance.OnDiagram(value));
|
|
|
|
}
|
|
|
|
public override void Hide()
|
|
|
|
{
|
|
|
|
base.Hide();
|
|
|
|
PumpRoomToggle.isOn = false;
|
|
|
|
IndoorHydrantToggle.isOn = false;
|
|
|
|
PumpAdapterToggle.isOn = false;
|
|
|
|
OutdoorHydrantToggle.isOn = false;
|
|
|
|
DiagramToggle.isOn = false;
|
|
|
|
}
|
|
|
|
}
|