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.
36 lines
1.2 KiB
36 lines
1.2 KiB
using UnityEngine; |
|
using UnityEngine.UI; |
|
using UniRx; |
|
|
|
public class FireDesignMenuPanel : UIView |
|
{ |
|
public Toggle RefugeFloorToggle; |
|
public Toggle FireCompartmentToggle; |
|
public Toggle FireDoorToggle; |
|
public Toggle FireShutterToggle; |
|
public override void Awake() |
|
{ |
|
base.Awake(); |
|
//避难层 |
|
RefugeFloorToggle.OnValueChangedAsObservable() |
|
.Subscribe(value => MainMenu.Instance.OnRefugeFloor(value)).AddTo(gameObject); |
|
//防火分区 |
|
FireCompartmentToggle.OnValueChangedAsObservable() |
|
.Subscribe(value => MainMenu.Instance.OnFireCompartment(value)).AddTo(gameObject); |
|
//防火门 |
|
FireDoorToggle.OnValueChangedAsObservable() |
|
.Subscribe(value => MainMenu.Instance.OnFireDoor(value)).AddTo(gameObject); |
|
//防火卷帘 |
|
FireShutterToggle.OnValueChangedAsObservable() |
|
.Subscribe(value => MainMenu.Instance.OnFireShutters(value)).AddTo(gameObject); |
|
} |
|
|
|
public override void Hide() |
|
{ |
|
base.Hide(); |
|
RefugeFloorToggle.isOn = false; |
|
FireCompartmentToggle.isOn = false; |
|
FireDoorToggle.isOn = false; |
|
FireShutterToggle.isOn = false; |
|
} |
|
}
|
|
|