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.
31 lines
929 B
31 lines
929 B
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; |
|
} |
|
}
|
|
|