//服务端带消息主动断开连接。该状态只是等待服务端触发OnClientDisconnect class DisconnectingWithReasonState : OnlineState { public override void Enter() { } public override void Exit() { } //与服务端断开,切换到OfflineState public override void OnClientDisconnect(ulong client) { m_ConnectionManager.ChangeState(m_ConnectionManager.m_Offline); } }