ShowChoosePanelSelect.cs 975 B

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