Пример #1
0
        public void ProcessMatchStatus(NetworkResponse response)
        {
            ResponseMatchStatus args = response as ResponseMatchStatus;

            isActive        = args.isActive;
            opponentIsReady = args.opponentIsReady;
            Debug.Log("Player iActive: " + isActive + " opponentIsReady " + opponentIsReady);
        }
 public static NetworkResponse Parse(MemoryStream dataStream)
 {
     ResponseMatchStatus response = new ResponseMatchStatus();
     response.status = DataReader.ReadShort(dataStream);
     response.matchID = DataReader.ReadInt(dataStream);
     response.isActive = DataReader.ReadBool(dataStream);
     response.opponentIsReady = DataReader.ReadBool (dataStream);
     Debug.Log("matchstatus status " + response.status);
     return response;
 }
Пример #3
0
        public static NetworkResponse Parse(MemoryStream dataStream)
        {
            ResponseMatchStatus response = new ResponseMatchStatus();

            response.status          = DataReader.ReadShort(dataStream);
            response.matchID         = DataReader.ReadInt(dataStream);
            response.isActive        = DataReader.ReadBool(dataStream);
            response.opponentIsReady = DataReader.ReadBool(dataStream);
            Debug.Log("matchstatus status " + response.status);
            return(response);
        }
Пример #4
0
        //Response to the server's ready request
        public void ProcessMatchStatus(NetworkResponse response)
        {
            short status;
            //Retrieve the response arguments
            ResponseMatchStatus args = response as ResponseMatchStatus;

            status = args.status;
            if (status == Constants.STATUS_SUCCESS)    //Request the deck from Server
            {
                GetDeck();
                //Set variables passed in from server related to the match's status
                GameManager.player1.isActive = args.isActive;
                GameManager.opponentIsReady  = args.opponentIsReady;

                //Display the arguments passed from server
                Debug.Log("GameManager.player1 isActive: " + GameManager.player1.isActive +
                          " opponentIsReady " + GameManager.opponentIsReady);
            }
            else
            {
                Debug.Log("Failed to acquire Match Status");
                // Could return to Lobby Here
            }
        }