上海虹口龙之梦项目
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.
 
 
 
 

69 lines
2.7 KiB

using UnityEngine;
using UnityEngine.UI;
using UniRx;
public class IntroductionMenuPanel : UIView
{
public Toggle InformationToggle;
public Toggle FeaturesToggle;
public Toggle HeightToggle;
public Toggle AdjacentToggle;
public Toggle FireClimbingSurfaceToggle;
public Toggle HazardSourceToggle;
public Toggle NoParkingToggle;
public Toggle KeyAreaToggle;
public Toggle PanoramaToggle;
public Toggle EscapeWindowToggle;
public Toggle BreakPointToggle;
public Toggle FireStationToggle;
public override void Awake()
{
base.Awake();
//基本信息
InformationToggle.OnValueChangedAsObservable()
.Subscribe(value => MainMenu.Instance.OnInformation(value));
//建筑特点
FeaturesToggle.OnValueChangedAsObservable()
.Subscribe(value => MainMenu.Instance.OnBuildingFeature(value));
//高度
HeightToggle.OnValueChangedAsObservable()
.Subscribe(value => MainMenu.Instance.OnHeight(value));
//毗邻
AdjacentToggle.OnValueChangedAsObservable()
.Subscribe(value => MainMenu.Instance.OnAdjacent(value));
//登高作业面
FireClimbingSurfaceToggle.onValueChanged.AddListener((bool value)=> MainMenu.Instance.OnFireClimbingSurface(value));
//危险源
HazardSourceToggle.onValueChanged.AddListener((bool value) => MainMenu.Instance.OnHazardSource(value));
//禁停区
NoParkingToggle.onValueChanged.AddListener((bool value) => MainMenu.Instance.OnNoParking(value));
//重点提示
KeyAreaToggle.onValueChanged.AddListener((bool value) => MainMenu.Instance.OnKeyPoint(value));
//图片标注
PanoramaToggle.onValueChanged.AddListener((bool value) => MainMenu.Instance.OnImageMarked(value));
//逃生窗
EscapeWindowToggle.onValueChanged.AddListener((bool value) => MainMenu.Instance.OnEscapeWindow(value));
//破拆点
BreakPointToggle.onValueChanged.AddListener((bool value) => MainMenu.Instance.OnBreakPoint(value));
//微型消防站
FireStationToggle.OnValueChangedAsObservable()
.Subscribe(value => MainMenu.Instance.OnFireStation(value));
}
public override void Hide()
{
base.Hide();
InformationToggle.isOn = false;
FeaturesToggle.isOn = false;
HeightToggle.isOn = false;
AdjacentToggle.isOn = false;
FireClimbingSurfaceToggle.isOn = false;
HazardSourceToggle.isOn = false;
NoParkingToggle.isOn = false;
KeyAreaToggle.isOn = false;
PanoramaToggle.isOn = false;
EscapeWindowToggle.isOn = false;
BreakPointToggle.isOn = false;
FireStationToggle.isOn = false;
}
}