ChooseManage.cs 462 B

12345678910111213141516171819202122
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. public class ChooseManage : MonoBehaviour
  4. {
  5. public List<GameObject> openlist;
  6. public List<GameObject> closelist;
  7. private void Start()
  8. {
  9. }
  10. public void changeList(int index)
  11. {
  12. for (int i = 0; i < openlist.Count; i++)
  13. {
  14. openlist[i].SetActive(false);
  15. closelist[i].SetActive(true);
  16. }
  17. openlist[index].SetActive(true);
  18. }
  19. }