123456789101112131415161718192021222324252627282930313233343536 |
- using System;
- using UnityEngine;
- public class ClientConnectedState : ConnectionState
- {
- public override void Enter()
- {
- }
- public override void Exit()
- {
- }
-
- public override void OnClientDisconnect(ulong clientId)
- {
-
- m_ConnectionManager.ChangeState(m_ConnectionManager.m_ClientReconnecting);
- }
-
- public override void OnUserRequestedShutdown()
- {
- MessageCenter.SendMessage(EventDefine.ConnectStatusEvent, ConnectStatus.UserRequestedDisconnect);
- m_ConnectionManager.ChangeState(m_ConnectionManager.m_Offline);
- }
-
- public override void OnDisconnectReasonReceived(ConnectStatus disconnectReason)
- {
- MessageCenter.SendMessage(EventDefine.ConnectStatusEvent, disconnectReason);
-
- m_ConnectionManager.ChangeState(m_ConnectionManager.m_DisconnectingWithReason);
- }
- }
|