You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
HighGroundRoyaleNetcode/Assets/Scripts/ConnectionManagement/ConnectionState/DisconnectingWithReasonStat...

25 lines
871 B
C#

namespace Unity.BossRoom.ConnectionManagement
{
/// <summary>
/// Connection state corresponding to a client who received a message from the server with a disconnect reason.
/// Since our disconnect process runs in multiple steps host side, this state is the first step client side. This
/// state simply waits for the actual disconnect, then transitions to the offline state.
/// </summary>
class DisconnectingWithReasonState : ConnectionState
{
public override void Enter() { }
public override void Exit() { }
public override void OnClientDisconnect(ulong _)
{
m_ConnectionManager.ChangeState(m_ConnectionManager.m_Offline);
}
public override void OnUserRequestedShutdown()
{
m_ConnectionManager.ChangeState(m_ConnectionManager.m_Offline);
}
}
}