using System.Collections; using System.Collections.Generic; using UnityEngine; public class DangJianManager : MonoBehaviour { public List oldList; public List newList; public List sound; private void Start() { for (int i = 0; i < oldList.Count; i++) { oldList[i].SetActive(true); newList[i].SetActive(false); sound[i].SetActive(false); } } public void show(int index) { for (int i = 0; i < oldList.Count; i++) { if (index == i) { oldList[i].SetActive(false); newList[i].SetActive(true); sound[i].SetActive(true); } else { oldList[i].SetActive(true); newList[i].SetActive(false); sound[i].SetActive(false); } } } public void hide(int index) { /* for (int i = 0; i < oldList.Count; i++) { if (index == i) { oldList[i].SetActive(true); newList[i].SetActive(false); sound[i].SetActive(false); } }*/ } }