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

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using AX.MessageSystem;
[RequireComponent(typeof(Toggle))]
public class DeviceMenuToggle : MonoBehaviour
{
public DeviceType menuType;
private Toggle M_toggle;
void Start()
{
M_toggle = GetComponent<Toggle>();
M_toggle.onValueChanged.AddListener(M_toggle_ValueChanged);
}
private void M_toggle_ValueChanged(bool isOn)
{
if (isOn)
{
DevicePanelManager.Instance.ShowBindList(menuType);
}
else
{
DevicePanelManager.Instance.ShowBindList(DeviceType.);
}
MessageDispatcher.SendMessage("DeviceMenuChanged", new KeyValuePair<DeviceType, bool>(menuType, isOn));
}
}