ModelApiResponse.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. using System;
  2. using System.Collections.Generic;
  3. using HttpApi;
  4. namespace Api
  5. {
  6. [Serializable]
  7. public class ModelApiResponse
  8. {
  9. public int code;
  10. public string err;
  11. public ResponseSuccessData data;
  12. }
  13. [Serializable]
  14. public class ModelBattleDetailListApiResponse
  15. {
  16. public int code;
  17. public string err;
  18. public BattleDetailListObj data;
  19. }
  20. [Serializable]
  21. public class PlayerInfo
  22. {
  23. public string avatar;
  24. public int diamond;
  25. public string name;
  26. public int id;
  27. public int playerId;
  28. public int score;
  29. }
  30. [Serializable]
  31. public class ResponseSuccessData
  32. {
  33. public string session;
  34. public List<Msg> msgs;
  35. public List<PlayerInfo> players;
  36. public List<Cock> playerCocks;
  37. public List<MarketCock> market;
  38. public List<CockType> cockTypes;
  39. public List<PlayerInfo> rankList;
  40. // 查询用户信息用
  41. public string name;
  42. public string icon;
  43. public PlayerInfo selfInfo;
  44. // 对战
  45. public BattleDetailListObj battleInfo;
  46. }
  47. [Serializable]
  48. public class MarketCock
  49. {
  50. public int marketId;
  51. public int cockId;
  52. public int times;
  53. public int diamond;
  54. }
  55. [Serializable]
  56. public class Cock
  57. {
  58. public int cockId;
  59. public int times;
  60. }
  61. [Serializable]
  62. public class CockType
  63. {
  64. public int id;
  65. public string name;
  66. public float atkStar;
  67. public float hpStar;
  68. public float intervalStar;
  69. }
  70. [Serializable]
  71. public class Msg
  72. {
  73. public int msgFromPlayer;
  74. public string id;
  75. public int type;
  76. public MsgContent content;
  77. }
  78. public static class MsgContentType
  79. {
  80. public static readonly string ChooseCock = "ChooseCock";
  81. public static readonly string SelectDiamond = "SelectDiamond";
  82. }
  83. [Serializable]
  84. public class MsgContent
  85. {
  86. //这2个字段用来战斗中的消息
  87. public string contentType;
  88. public int cockId;
  89. public int diamond;
  90. //下面是准备信息
  91. public string battleSession;
  92. public long bid;
  93. public PlayerInfo invitePlayer;
  94. public int from;
  95. public int to;
  96. public int fromCockId;
  97. public int toCockId;
  98. public bool fromPlayerReady;
  99. public bool toPlayerReady;
  100. public bool winPlayer;
  101. }
  102. }