ChallengeRequestUIData.cs 641 B

12345678910111213141516171819
  1. using System.Collections;
  2. public class ChallengeRequestUIData
  3. {
  4. public RequestInfo requestInfo;
  5. public int score;
  6. public int challengeId;
  7. public int levelId;
  8. public string name { get { return requestInfo.senderName; } }
  9. public string otherFacebookId { get { return requestInfo.senderID; } }
  10. public ChallengeRequestUIData(RequestInfo info)
  11. {
  12. requestInfo = info;
  13. Hashtable keyValuePairs = MessageCenter.ParseRequestData(info.data);
  14. int.TryParse((string)keyValuePairs["levelid"], out levelId);
  15. int.TryParse((string)keyValuePairs["score"], out score);
  16. int.TryParse((string)keyValuePairs["challengeid"], out challengeId);
  17. }
  18. }