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.
22 lines
731 B
C#
22 lines
731 B
C#
3 weeks ago
|
namespace Unity.BossRoom.ConnectionManagement
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Base class representing an online connection state.
|
||
|
/// </summary>
|
||
|
abstract class OnlineState : ConnectionState
|
||
|
{
|
||
|
public override void OnUserRequestedShutdown()
|
||
|
{
|
||
|
// This behaviour will be the same for every online state
|
||
|
m_ConnectStatusPublisher.Publish(ConnectStatus.UserRequestedDisconnect);
|
||
|
m_ConnectionManager.ChangeState(m_ConnectionManager.m_Offline);
|
||
|
}
|
||
|
|
||
|
public override void OnTransportFailure()
|
||
|
{
|
||
|
// This behaviour will be the same for every online state
|
||
|
m_ConnectionManager.ChangeState(m_ConnectionManager.m_Offline);
|
||
|
}
|
||
|
}
|
||
|
}
|