Example #1
0
 public void MergeFrom(SrvRes other)
 {
     if (other == null)
     {
         return;
     }
     if (other.MethodId != global::Lspb.SrvMsgType.ErrorClientType)
     {
         MethodId = other.MethodId;
     }
     if (other.Result != global::Lspb.Result.Success)
     {
         Result = other.Result;
     }
     if (other.ErrStr.Length != 0)
     {
         ErrStr = other.ErrStr;
     }
     if (other.srvEnterRoom_ != null)
     {
         if (srvEnterRoom_ == null)
         {
             SrvEnterRoom = new global::Lspb.SrvEnterRoom();
         }
         SrvEnterRoom.MergeFrom(other.SrvEnterRoom);
     }
     if (other.srvInitOver_ != null)
     {
         if (srvInitOver_ == null)
         {
             SrvInitOver = new global::Lspb.SrvInitOver();
         }
         SrvInitOver.MergeFrom(other.SrvInitOver);
     }
     if (other.bGameInit_ != null)
     {
         if (bGameInit_ == null)
         {
             BGameInit = new global::Lspb.BGameInit();
         }
         BGameInit.MergeFrom(other.BGameInit);
     }
     if (other.bGameStart_ != null)
     {
         if (bGameStart_ == null)
         {
             BGameStart = new global::Lspb.BGameStart();
         }
         BGameStart.MergeFrom(other.BGameStart);
     }
     if (other.bGameFrame_ != null)
     {
         if (bGameFrame_ == null)
         {
             BGameFrame = new global::Lspb.BGameFrame();
         }
         BGameFrame.MergeFrom(other.BGameFrame);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Example #2
0
        public static void SrvEnterRoom(int playerId = 0, Result result = Result.Success, string errStr = "")
        {
            SrvEnterRoom srvEnterRoom = new SrvEnterRoom();

            srvEnterRoom.PlayerId = playerId;

            SrvRes res = CreateSrvRes(SrvMsgType.SrvEnterRoom, result, errStr);

            res.SrvEnterRoom = srvEnterRoom;

            UdpSocket.Send(Serialize(res));
        }
Example #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MethodId != global::Lspb.SrvMsgType.ErrorClientType)
            {
                hash ^= MethodId.GetHashCode();
            }
            if (Result != global::Lspb.Result.Success)
            {
                hash ^= Result.GetHashCode();
            }
            if (ErrStr.Length != 0)
            {
                hash ^= ErrStr.GetHashCode();
            }
            if (srvEnterRoom_ != null)
            {
                hash ^= SrvEnterRoom.GetHashCode();
            }
            if (srvInitOver_ != null)
            {
                hash ^= SrvInitOver.GetHashCode();
            }
            if (bGameInit_ != null)
            {
                hash ^= BGameInit.GetHashCode();
            }
            if (bGameStart_ != null)
            {
                hash ^= BGameStart.GetHashCode();
            }
            if (bGameFrame_ != null)
            {
                hash ^= BGameFrame.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #4
0
 protected override void SrvEnterRoom(SrvEnterRoom msg, Result result, string errStr)
 {
     Console.WriteLine("SrvEnterRoom");
 }
Example #5
0
 protected virtual void SrvEnterRoom(SrvEnterRoom msg, Result result, string errStr)
 {
     Console.WriteLine("-----------------------no implements SrvEnterRoom-----------------------");
 }