网演高层钦州
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.
 
 
 

43 lines
1.1 KiB

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class SettingToggleChange : MonoBehaviour {
public Toggle ShowToggle;
public Toggle VoiceToggle;
public Toggle FrameToggle;
public GameObject ShowPanel;
public GameObject VoicePanel;
public GameObject FramePanel;
// Use this for initialization
void Start () {
ShowToggle.onValueChanged.AddListener(showToggleChange);
VoiceToggle.onValueChanged.AddListener(voiceToggleChange);
FrameToggle.onValueChanged.AddListener(frameToggleChange);
}
private void frameToggleChange(bool arg0)
{
FrameToggle.transform.Find("Image").gameObject.SetActive(arg0);
FramePanel.SetActive(arg0);
}
private void voiceToggleChange(bool arg0)
{
VoiceToggle.transform.Find("Image").gameObject.SetActive(arg0);
VoicePanel.SetActive(arg0);
}
private void showToggleChange(bool arg0)
{
ShowToggle.transform.Find("Image").gameObject.SetActive(arg0);
ShowPanel.SetActive(arg0);
}
}