/** * 匹配超时广播 */ public void OnMatchTimeout(BroadcastEvent eve) { var bst = new MatchTimeoutBst(); bst.MergeFrom((ByteString)eve.Data); var roomEvent = new BroadcastEvent( new MatchBst { ErrCode = bst.ErrCode }, eve.Seq ); com.unity.mgobe.Room.OnMatch?.Invoke(roomEvent); }
/** * 匹配超时广播 */ public void OnMatchTimeout(BroadcastEvent eve) { var bst = new MatchTimeoutBst(); bst.MergeFrom((ByteString)eve.Data); if (bst.MatchType == MatchType.PlayerComplex) { } else { return; } var matchErrCode = bst.ErrCode != 0 ? bst.ErrCode : (int)QAppProtoErrCode.EcMatchTimeout; var errCode = SdkUtil.ErrCodeConvert(matchErrCode); var errMsg = SdkUtil.ErrCodeConvert(errCode, ""); var e = new ResponseEvent(errCode, errMsg, "", new object()); }