캐릭터 움직임 및 애니메이션
This commit is contained in:
45
Assets/Scripts/Network/NetworkLauncher.cs
Normal file
45
Assets/Scripts/Network/NetworkLauncher.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using UnityEngine;
|
||||
using Unity.Netcode;
|
||||
|
||||
namespace Colosseum.Network
|
||||
{
|
||||
/// <summary>
|
||||
/// 네트워크 연결 관리 (Host/Client 시작)
|
||||
/// </summary>
|
||||
public class NetworkLauncher : MonoBehaviour
|
||||
{
|
||||
[Header("UI References")]
|
||||
[SerializeField] private GameObject connectionUI;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// 게임 시작 시 UI 표시
|
||||
if (connectionUI != null)
|
||||
connectionUI.SetActive(true);
|
||||
}
|
||||
|
||||
public void StartHost()
|
||||
{
|
||||
NetworkManager.Singleton.StartHost();
|
||||
HideConnectionUI();
|
||||
}
|
||||
|
||||
public void StartClient()
|
||||
{
|
||||
NetworkManager.Singleton.StartClient();
|
||||
HideConnectionUI();
|
||||
}
|
||||
|
||||
public void StartServer()
|
||||
{
|
||||
NetworkManager.Singleton.StartServer();
|
||||
HideConnectionUI();
|
||||
}
|
||||
|
||||
private void HideConnectionUI()
|
||||
{
|
||||
if (connectionUI != null)
|
||||
connectionUI.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user