上海虹口龙之梦项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.7 KiB

12 months ago
using UnityEngine;
using UnityEngine.UI;
using UniRx;
public class WaterSystemMenuPanel : UIView
{
public Toggle PumpRoomToggle;
public Toggle SXToggle;
public Toggle PLBToggle;
12 months ago
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));
12 months ago
//室内消火栓
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;
}
}