using System;
using Unity.Netcode;
using UnityEngine;

//连接状态基类
public abstract class ConnectionState
{
    //状态机管理器
    public ConnectionManager m_ConnectionManager;

    public abstract void Enter();

    public abstract void Exit();

    public virtual void OnClientConnected(ulong clientId)
    {
    }
    public virtual void OnClientDisconnect(ulong clientId)
    {
    }

    public virtual void OnServerStarted()
    {
    }

    public virtual void StartClientIP(string ipaddress, int port)
    {
    }

    public virtual void StartHostIP(string ipaddress, int port)
    {
    }

    public virtual void OnUserRequestedShutdown()
    {
    }

    public virtual void OnDisconnectReasonReceived(ConnectStatus disconnectReason)
    {
    }

    public virtual void ApprovalCheck(NetworkManager.ConnectionApprovalRequest request, NetworkManager.ConnectionApprovalResponse response)
    {
    }

    public virtual void OnTransportFailure()
    {
    }
}
