Beispiel #1
0
        // 自定义服务广播
        private void OnRecvFromGameSvr(DecodeBstResult bst, string seq)
        {
            var body = new RecvFromGameSvrBst();

            body.MergeFrom(bst.Body);
            var eve = new BroadcastEvent(bst.Body, seq);

            this._responses.OnRecvFromGameSvr(body.RoomId, eve);
        }
Beispiel #2
0
 /**
  * 自定义服务广播
  */
 public void OnRecvFromGameSvr(string id, BroadcastEvent eve)
 {
     if (!this.MatchId(id))
     {
         return;
     }
     try {
         var bst = new RecvFromGameSvrBst();
         bst.MergeFrom((ByteString)eve.Data);
         eve.Data = bst;
         _room.OnRecvFromGameSvr?.Invoke(eve);
     } catch (Exception e) {
         Debugger.Log(e.ToString());
     }
 }