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.
32 lines
929 B
32 lines
929 B
1 year ago
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
using UniRx;
|
||
|
|
||
|
public class EvacuationSystemMenuPanel : UIView
|
||
|
{
|
||
|
public Toggle FireEscapeToggle;
|
||
|
public Toggle EscapeStairToggle;
|
||
|
public Toggle FireElevatorToggle;
|
||
|
|
||
|
public override void Awake()
|
||
|
{
|
||
|
base.Awake();
|
||
|
//安全出口
|
||
|
FireEscapeToggle.OnValueChangedAsObservable()
|
||
|
.Subscribe(value => MainMenu.Instance.OnFireEscape(value));
|
||
|
//疏散楼梯
|
||
|
EscapeStairToggle.OnValueChangedAsObservable()
|
||
|
.Subscribe(value => MainMenu.Instance.OnEscapeStiar(value));
|
||
|
//消防电梯
|
||
|
FireElevatorToggle.OnValueChangedAsObservable()
|
||
|
.Subscribe(value => MainMenu.Instance.OnFireElevator(value));
|
||
|
}
|
||
|
public override void Hide()
|
||
|
{
|
||
|
base.Hide();
|
||
|
FireEscapeToggle.isOn = false;
|
||
|
EscapeStairToggle.isOn = false;
|
||
|
FireElevatorToggle.isOn = false;
|
||
|
}
|
||
|
}
|