广西桂平帝恒管道燃气投资有限公司多角色网上演练
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.
 
 
 
 
 

40 lines
940 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ShowSelect : MonoBehaviour
{
public Toggle MyToggle;
public Color InitColor;
public Color SelectColor;
public Image MyShowImg;
void Awake()
{
//MyToggle = GetComponent<Toggle>();
MyShowImg = transform.Find("ShowImg").GetComponent<Image>();
//MyToggle = MyShowImg.GetComponent<Toggle>();
}
public void GetGroup(ToggleGroup group)
{
MyToggle.group = group;
}
// Update is called once per frame
void Update()
{
if (MyToggle.isOn)
{
if (MyShowImg.color != SelectColor)
{
MyShowImg.color = SelectColor;
}
}
else
{
if (MyShowImg.color != InitColor)
{
MyShowImg.color = InitColor;
}
}
}
}