ShowChoosePanelSelect.cs 962 B

12345678910111213141516171819202122232425262728
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. namespace GHZLangChao
  4. {
  5. public class ShowChoosePanelSelect : AbstractController
  6. {
  7. [SerializeField] private Text currentRoom_Text; // 当前房间名
  8. [SerializeField] private Transform Content;
  9. private RoomName_Item item; // item
  10. void Start()
  11. {
  12. // currentRoom_Text.text = UICallManager.Instance.GetMachineRoomList()[0];
  13. // 实例化 item
  14. for (int i = 0;i< UICallManager.Instance.GetMachineRoomList().Count;i++)
  15. {
  16. GameObject go = Instantiate(InstantiateSystem.Instance.BlueObject.RoomName_Item, Content);
  17. item = go .GetComponent<RoomName_Item>();
  18. item.RoomName_Text.text = MachineRoomManager.Instance.listRoomName[i];
  19. go.name = UICallManager.Instance.GetMachineRoomList()[i];
  20. }
  21. }
  22. }
  23. }