Пример #1
0
        public static NetworkResponse Parse(MemoryStream dataStream)
        {
            ResponseLogin response = new ResponseLogin();
            response.status = DataReader.ReadShort(dataStream);

            if (response.status == 0) {
            int account_id = DataReader.ReadInt(dataStream);

            Account account = new Account(account_id);
            account.username = DataReader.ReadString(dataStream);
            account.last_logout = DataReader.ReadString(dataStream);

            response.account = account;
            } else {
            Debug.LogError ("Login failed, server message = " + response.status);
            }

            return response;
        }
Пример #2
0
        public static NetworkResponse Parse(MemoryStream dataStream)
        {
            ResponseLogin response = new ResponseLogin();

            response.status = DataReader.ReadShort(dataStream);

            if (response.status == 0)
            {
                int account_id = DataReader.ReadInt(dataStream);

                Account account = new Account(account_id);
                account.username    = DataReader.ReadString(dataStream);
                account.last_logout = DataReader.ReadString(dataStream);

                response.account = account;
            }
            else
            {
                Debug.LogError("Login failed, server message = " + response.status);
            }

            return(response);
        }