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.
77 lines
3.1 KiB
77 lines
3.1 KiB
using System.Collections; |
|
using System.Collections.Generic; |
|
using UniRx; |
|
using UnityEngine; |
|
using UnityEngine.UI; |
|
|
|
public class MainButtonsPanel : UIView |
|
{ |
|
public Button IntroductionButton; |
|
public Button FireControlRoomButton; |
|
public Button FireDesignButton; |
|
public Button SmokeControlButton; |
|
public Button WaterSystemButton; |
|
public Button EvacuationSystemButton; |
|
public Button RoamingButton; |
|
public Button WaterSourceButton; |
|
public Button RouteMapButton; |
|
public Button SituationPlottingButton; |
|
public Button LocationButton; |
|
|
|
public override void Awake() |
|
{ |
|
base.Awake(); |
|
|
|
//单位简介 |
|
IntroductionButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnIntroduction()); |
|
//人员定位 |
|
LocationButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnPersonnelLocation()); |
|
//消控室 |
|
FireControlRoomButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnFireControlRoom()); |
|
//防火设计 |
|
FireDesignButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnFireDesign()); |
|
//防排烟系统 |
|
SmokeControlButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnSmokeControl()); |
|
//供水系统 |
|
WaterSystemButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnWaterSystem()); |
|
//疏散系统 |
|
EvacuationSystemButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnEvacuationSystem()); |
|
//体验漫游 |
|
RoamingButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnRoaming()); |
|
//周边水源 |
|
WaterSourceButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnWaterSource()); |
|
//行车路线 |
|
RouteMapButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnRouteMap()); |
|
//态势标绘 |
|
SituationPlottingButton.OnClickAsObservable() |
|
.Subscribe(_ => MainMenu.Instance.OnSituationPlotting()); |
|
|
|
|
|
} |
|
|
|
public override void Show() |
|
{ |
|
base.Show(); |
|
IntroductionButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
FireControlRoomButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
FireDesignButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
SmokeControlButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
WaterSystemButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
EvacuationSystemButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
RoamingButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
WaterSourceButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
RouteMapButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
SituationPlottingButton.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); |
|
} |
|
|
|
}
|
|
|