SetResponse() публичный Метод

public SetResponse ( byte resp ) : void
resp byte
Результат void
Пример #1
0
        private int OnSelectChain(CoreMessage msg)
        {
            int player = msg.Reader.ReadByte();
            int count  = msg.Reader.ReadByte();

            msg.Reader.ReadBytes(10 + count * 12);

            if (count > 0)
            {
                Game.WaitForResponse(player);
                SendToPlayer(msg, player);
                return(1);
            }

            Game.SetResponse(-1);
            return(0);
        }
Пример #2
0
 private void OnResponse(BinaryReader packet)
 {
     if (Game.State != GameState.Duel)
     {
         return;
     }
     if (State != PlayerState.Response)
     {
         return;
     }
     byte[] resp = packet.ReadToEnd();
     if (resp.Length > 64)
     {
         return;
     }
     State = PlayerState.None;
     Game.SetResponse(resp);
 }