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