update MUTIPLAY
This commit is contained in:
28
Assets/Scripts/Fusion/LobbyManager.cs
Normal file
28
Assets/Scripts/Fusion/LobbyManager.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using Fusion;
|
||||
using UnityEngine;
|
||||
|
||||
public class LobbyManager : MonoBehaviour
|
||||
{
|
||||
[Header("UI References")]
|
||||
public Transform roomListContent; // Ô chứa danh sách phòng (nếu có)
|
||||
|
||||
public void DisplayRoomList(List<SessionInfo> sessionList)
|
||||
{
|
||||
Debug.Log($"<color=green>Lobby Update:</color> Đang tìm thấy {sessionList.Count} phòng.");
|
||||
|
||||
// Xóa danh sách cũ (nếu bạn làm UI)
|
||||
/*
|
||||
foreach (Transform child in roomListContent) {
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
*/
|
||||
|
||||
// Hiển thị danh sách mới
|
||||
foreach (var session in sessionList)
|
||||
{
|
||||
Debug.Log($"- Phòng: {session.Name} | Người chơi: {session.PlayerCount}/{session.MaxPlayers}");
|
||||
// Ở đây bạn sẽ Instantiate các Button đại diện cho mỗi phòng
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user