@cc-component/cc-core 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/.cc-ex-component.md +12 -0
  2. package/assets/core/config/CommonEnum.ts +94 -0
  3. package/assets/core/config/CommonEnum.ts.meta +9 -0
  4. package/assets/core/config/IConfig.ts +89 -0
  5. package/assets/core/config/IConfig.ts.meta +9 -0
  6. package/assets/core/config/LayerType.ts +44 -0
  7. package/assets/core/config/LayerType.ts.meta +9 -0
  8. package/assets/core/config/LayerUI.ts +113 -0
  9. package/assets/core/config/LayerUI.ts.meta +9 -0
  10. package/assets/core/config.meta +9 -0
  11. package/assets/core/editor/LanguageManager.ts +323 -0
  12. package/assets/core/editor/LanguageManager.ts.meta +9 -0
  13. package/assets/core/editor/SpineRunner.ts +39 -0
  14. package/assets/core/editor/SpineRunner.ts.meta +9 -0
  15. package/assets/core/editor/i18nEditorComponent.ts +137 -0
  16. package/assets/core/editor/i18nEditorComponent.ts.meta +9 -0
  17. package/assets/core/editor.meta +9 -0
  18. package/assets/core/home/AudioUtil.ts +164 -0
  19. package/assets/core/home/AudioUtil.ts.meta +9 -0
  20. package/assets/core/home/BaseBoxView.ts +60 -0
  21. package/assets/core/home/BaseBoxView.ts.meta +9 -0
  22. package/assets/core/home/BaseLaunchComponent.ts +9 -0
  23. package/assets/core/home/BaseLaunchComponent.ts.meta +9 -0
  24. package/assets/core/home/BaseLoading.ts +136 -0
  25. package/assets/core/home/BaseLoading.ts.meta +9 -0
  26. package/assets/core/home/BaseSkeleton.ts +39 -0
  27. package/assets/core/home/BaseSkeleton.ts.meta +9 -0
  28. package/assets/core/home/CameraAngel.ts +326 -0
  29. package/assets/core/home/CameraAngel.ts.meta +9 -0
  30. package/assets/core/home/DouYinShow.ts +27 -0
  31. package/assets/core/home/DouYinShow.ts.meta +9 -0
  32. package/assets/core/home/EventManager.ts +39 -0
  33. package/assets/core/home/EventManager.ts.meta +9 -0
  34. package/assets/core/home/ExView.ts +9 -0
  35. package/assets/core/home/ExView.ts.meta +9 -0
  36. package/assets/core/home/FollowCamera.ts +205 -0
  37. package/assets/core/home/FollowCamera.ts.meta +9 -0
  38. package/assets/core/home/InViewCenter.ts +52 -0
  39. package/assets/core/home/InViewCenter.ts.meta +9 -0
  40. package/assets/core/home/JsonUtil.ts +102 -0
  41. package/assets/core/home/JsonUtil.ts.meta +9 -0
  42. package/assets/core/home/LoadingWindow.ts +44 -0
  43. package/assets/core/home/LoadingWindow.ts.meta +9 -0
  44. package/assets/core/home/ParabolaTween.ts +110 -0
  45. package/assets/core/home/ParabolaTween.ts.meta +9 -0
  46. package/assets/core/home/ProgessView.ts +96 -0
  47. package/assets/core/home/ProgessView.ts.meta +9 -0
  48. package/assets/core/home/Quaternion.ts +237 -0
  49. package/assets/core/home/Quaternion.ts.meta +9 -0
  50. package/assets/core/home/ResUtil.ts +132 -0
  51. package/assets/core/home/ResUtil.ts.meta +9 -0
  52. package/assets/core/home/ResourceManager.ts +430 -0
  53. package/assets/core/home/ResourceManager.ts.meta +9 -0
  54. package/assets/core/home/StateMachine.ts +93 -0
  55. package/assets/core/home/StateMachine.ts.meta +9 -0
  56. package/assets/core/home/StorageManager.ts +161 -0
  57. package/assets/core/home/StorageManager.ts.meta +9 -0
  58. package/assets/core/home/ThirdFreeLookCamera.ts +201 -0
  59. package/assets/core/home/ThirdFreeLookCamera.ts.meta +9 -0
  60. package/assets/core/home/TimeManager.ts +486 -0
  61. package/assets/core/home/TimeManager.ts.meta +9 -0
  62. package/assets/core/home/Tools.ts +103 -0
  63. package/assets/core/home/Tools.ts.meta +9 -0
  64. package/assets/core/home/prefabs.meta +12 -0
  65. package/assets/core/home/util/EncryptUtil.ts +60 -0
  66. package/assets/core/home/util/EncryptUtil.ts.meta +11 -0
  67. package/assets/core/home/util/MathUtil.ts +22 -0
  68. package/assets/core/home/util/MathUtil.ts.meta +9 -0
  69. package/assets/core/home/util/Md5.ts +202 -0
  70. package/assets/core/home/util/Md5.ts.meta +11 -0
  71. package/assets/core/home/util/RandomUtil.ts +61 -0
  72. package/assets/core/home/util/RandomUtil.ts.meta +9 -0
  73. package/assets/core/home/util/ResUtil.ts +129 -0
  74. package/assets/core/home/util/ResUtil.ts.meta +9 -0
  75. package/assets/core/home/util/crypto-js.d.ts +30 -0
  76. package/assets/core/home/util/crypto-js.d.ts.meta +11 -0
  77. package/assets/core/home/util/crypto-js.js +6030 -0
  78. package/assets/core/home/util/crypto-js.js.meta +9 -0
  79. package/assets/core/home/util.meta +12 -0
  80. package/assets/core/home.meta +12 -0
  81. package/assets/core/interface/ISceneParam.ts +11 -0
  82. package/assets/core/interface/ISceneParam.ts.meta +9 -0
  83. package/assets/core/interface/Interface.ts +160 -0
  84. package/assets/core/interface/Interface.ts.meta +1 -0
  85. package/assets/core/interface/MainModule.ts +1019 -0
  86. package/assets/core/interface/MainModule.ts.meta +9 -0
  87. package/assets/core/interface.meta +9 -0
  88. package/assets/core/lib/Logger.ts +286 -0
  89. package/assets/core/lib/Logger.ts.meta +9 -0
  90. package/assets/core/lib/language/.language.md +1 -0
  91. package/assets/core/lib/language/Language.ts +133 -0
  92. package/assets/core/lib/language/Language.ts.meta +13 -0
  93. package/assets/core/lib/language/LanguageData.ts +114 -0
  94. package/assets/core/lib/language/LanguageData.ts.meta +9 -0
  95. package/assets/core/lib/language/LanguageLabel.ts +172 -0
  96. package/assets/core/lib/language/LanguageLabel.ts.meta +13 -0
  97. package/assets/core/lib/language/LanguagePack.ts +126 -0
  98. package/assets/core/lib/language/LanguagePack.ts.meta +13 -0
  99. package/assets/core/lib/language/LanguagePointLabel.ts.meta +16 -0
  100. package/assets/core/lib/language/LanguageSpine.ts +60 -0
  101. package/assets/core/lib/language/LanguageSpine.ts.meta +9 -0
  102. package/assets/core/lib/language/LanguageSprite.ts +138 -0
  103. package/assets/core/lib/language/LanguageSprite.ts.meta +13 -0
  104. package/assets/core/lib/language.meta +9 -0
  105. package/assets/core/lib/logger/ELoggerLevel.ts +16 -0
  106. package/assets/core/lib/logger/ELoggerLevel.ts.meta +9 -0
  107. package/assets/core/lib/logger/MLogger.ts +118 -0
  108. package/assets/core/lib/logger/MLogger.ts.meta +9 -0
  109. package/assets/core/lib/logger.meta +9 -0
  110. package/assets/core/lib/net/libs/proto/output/protobuf.d.ts +2729 -0
  111. package/assets/core/lib/net/libs/proto/output/protobuf.d.ts.meta +9 -0
  112. package/assets/core/lib/net/libs/proto/output/protobuf.min.js +8 -0
  113. package/assets/core/lib/net/libs/proto/output/protobuf.min.js.meta +9 -0
  114. package/assets/core/lib/net/libs/proto/output/protobuf_custom.d.ts +102 -0
  115. package/assets/core/lib/net/libs/proto/output/protobuf_custom.d.ts.meta +9 -0
  116. package/assets/core/lib/net/libs/proto/output/protobuf_custom.js +222 -0
  117. package/assets/core/lib/net/libs/proto/output/protobuf_custom.js.meta +9 -0
  118. package/assets/core/lib/net/libs/proto/output.meta +9 -0
  119. package/assets/core/lib/net/libs/proto/source/Cmd.proto +6 -0
  120. package/assets/core/lib/net/libs/proto/source/Cmd.proto.meta +11 -0
  121. package/assets/core/lib/net/libs/proto/source/UserLogin.proto +12 -0
  122. package/assets/core/lib/net/libs/proto/source/UserLogin.proto.meta +11 -0
  123. package/assets/core/lib/net/libs/proto/source/base.proto +24 -0
  124. package/assets/core/lib/net/libs/proto/source/base.proto.meta +11 -0
  125. package/assets/core/lib/net/libs/proto/source/command.proto +31 -0
  126. package/assets/core/lib/net/libs/proto/source/command.proto.meta +11 -0
  127. package/assets/core/lib/net/libs/proto/source/domain/boos_battle_info.proto +13 -0
  128. package/assets/core/lib/net/libs/proto/source/domain/boos_battle_info.proto.meta +11 -0
  129. package/assets/core/lib/net/libs/proto/source/domain/player_auth.proto +26 -0
  130. package/assets/core/lib/net/libs/proto/source/domain/player_auth.proto.meta +11 -0
  131. package/assets/core/lib/net/libs/proto/source/domain.meta +9 -0
  132. package/assets/core/lib/net/libs/proto/source/message/game_push.proto +23 -0
  133. package/assets/core/lib/net/libs/proto/source/message/game_push.proto.meta +11 -0
  134. package/assets/core/lib/net/libs/proto/source/message/game_request.proto +24 -0
  135. package/assets/core/lib/net/libs/proto/source/message/game_request.proto.meta +11 -0
  136. package/assets/core/lib/net/libs/proto/source/message/game_response.proto +24 -0
  137. package/assets/core/lib/net/libs/proto/source/message/game_response.proto.meta +11 -0
  138. package/assets/core/lib/net/libs/proto/source/message.meta +9 -0
  139. package/assets/core/lib/net/libs/proto/source/push/boss_battle_events.proto +43 -0
  140. package/assets/core/lib/net/libs/proto/source/push/boss_battle_events.proto.meta +11 -0
  141. package/assets/core/lib/net/libs/proto/source/push.meta +9 -0
  142. package/assets/core/lib/net/libs/proto/source.meta +12 -0
  143. package/assets/core/lib/net/libs/proto.meta +9 -0
  144. package/assets/core/lib/net/libs.meta +9 -0
  145. package/assets/core/lib/net/net/HttpManager.ts +307 -0
  146. package/assets/core/lib/net/net/HttpManager.ts.meta +9 -0
  147. package/assets/core/lib/net/net/NetInterface.ts +114 -0
  148. package/assets/core/lib/net/net/NetInterface.ts.meta +9 -0
  149. package/assets/core/lib/net/net/NetManager.ts +77 -0
  150. package/assets/core/lib/net/net/NetManager.ts.meta +9 -0
  151. package/assets/core/lib/net/net/NetNode.ts +471 -0
  152. package/assets/core/lib/net/net/NetNode.ts.meta +9 -0
  153. package/assets/core/lib/net/net/WebSock.ts +81 -0
  154. package/assets/core/lib/net/net/WebSock.ts.meta +9 -0
  155. package/assets/core/lib/net/net/custom/NetChannelManager.ts +41 -0
  156. package/assets/core/lib/net/net/custom/NetChannelManager.ts.meta +9 -0
  157. package/assets/core/lib/net/net/custom/NetConfig.ts +11 -0
  158. package/assets/core/lib/net/net/custom/NetConfig.ts.meta +9 -0
  159. package/assets/core/lib/net/net/custom/NetErrorCode.ts +4 -0
  160. package/assets/core/lib/net/net/custom/NetErrorCode.ts.meta +9 -0
  161. package/assets/core/lib/net/net/custom/NetGameTips.ts +53 -0
  162. package/assets/core/lib/net/net/custom/NetGameTips.ts.meta +9 -0
  163. package/assets/core/lib/net/net/custom/NetNodeGame.ts +105 -0
  164. package/assets/core/lib/net/net/custom/NetNodeGame.ts.meta +9 -0
  165. package/assets/core/lib/net/net/custom.meta +9 -0
  166. package/assets/core/lib/net/net/protocol/NetProtocolJson.ts +39 -0
  167. package/assets/core/lib/net/net/protocol/NetProtocolJson.ts.meta +9 -0
  168. package/assets/core/lib/net/net/protocol/NetProtocolProtobuf.ts +85 -0
  169. package/assets/core/lib/net/net/protocol/NetProtocolProtobuf.ts.meta +9 -0
  170. package/assets/core/lib/net/net/protocol.meta +9 -0
  171. package/assets/core/lib/net/net.meta +9 -0
  172. package/assets/core/lib/net/prompt.meta +9 -0
  173. package/assets/core/lib/net.meta +9 -0
  174. package/assets/core/lib/old/VM2.ts +619 -0
  175. package/assets/core/lib/old/VM2.ts.meta +9 -0
  176. package/assets/core/lib/old/ViewModel.ts +905 -0
  177. package/assets/core/lib/old/ViewModel.ts.meta +9 -0
  178. package/assets/core/lib/old/ViewSearch.ts +125 -0
  179. package/assets/core/lib/old/ViewSearch.ts.meta +9 -0
  180. package/assets/core/lib/old.meta +9 -0
  181. package/assets/core/lib/tabbar/TabBarComponent.ts +113 -0
  182. package/assets/core/lib/tabbar/TabBarComponent.ts.meta +9 -0
  183. package/assets/core/lib/tabbar/TabBarController.ts +86 -0
  184. package/assets/core/lib/tabbar/TabBarController.ts.meta +9 -0
  185. package/assets/core/lib/tabbar/TabBarItem.ts +52 -0
  186. package/assets/core/lib/tabbar/TabBarItem.ts.meta +9 -0
  187. package/assets/core/lib/tabbar.meta +9 -0
  188. package/assets/core/lib.meta +12 -0
  189. package/assets/core.meta +9 -0
  190. package/assets.meta +9 -0
  191. package/index.ts +3 -0
  192. package/index.ts.meta +9 -0
  193. package/package.json +19 -0
  194. package/package.json.meta +11 -0
@@ -0,0 +1,9 @@
1
+ {
2
+ "ver": "4.0.24",
3
+ "importer": "typescript",
4
+ "imported": true,
5
+ "uuid": "f233e226-058a-46f8-b25d-389fe543d98a",
6
+ "files": [],
7
+ "subMetas": {},
8
+ "userData": {}
9
+ }
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * protobuf.js v6.10.0 (c) 2016, daniel wirtz
3
+ * compiled wed, 15 jul 2020 23:34:14 utc
4
+ * licensed under the bsd-3-clause license
5
+ * see: https://github.com/dcodeio/protobuf.js for details
6
+ */
7
+ !function(d){"use strict";var r,u,t,n;r={1:[function(t,n){n.exports=function(t,n){var i=Array(arguments.length-1),e=0,r=2,s=!0;for(;r<arguments.length;)i[e++]=arguments[r++];return new Promise(function(r,u){i[e]=function(t){if(s)if(s=!1,t)u(t);else{for(var n=Array(arguments.length-1),i=0;i<n.length;)n[i++]=arguments[i];r.apply(null,n)}};try{t.apply(n||null,i)}catch(t){s&&(s=!1,u(t))}})}},{}],2:[function(t,n,i){var r=i;r.length=function(t){var n=t.length;if(!n)return 0;for(var i=0;1<--n%4&&"="==t[0|n];)++i;return Math.ceil(3*t.length)/4-i};for(var o=Array(64),f=Array(123),u=0;u<64;)f[o[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;r.encode=function(t,n,i){for(var r,u=null,e=[],s=0,h=0;n<i;){var f=t[n++];switch(h){case 0:e[s++]=o[f>>2],r=(3&f)<<4,h=1;break;case 1:e[s++]=o[r|f>>4],r=(15&f)<<2,h=2;break;case 2:e[s++]=o[r|f>>6],e[s++]=o[63&f],h=0}8191<s&&((u=u||[]).push(String.fromCharCode.apply(String,e)),s=0)}return h&&(e[s++]=o[r],e[s++]=61,1===h&&(e[s++]=61)),u?(s&&u.push(String.fromCharCode.apply(String,e.slice(0,s))),u.join("")):String.fromCharCode.apply(String,e.slice(0,s))};var c="invalid encoding";r.decode=function(t,n,i){for(var r,u=i,e=0,s=0;s<t.length;){var h=t.charCodeAt(s++);if(61===h&&1<e)break;if((h=f[h])===d)throw Error(c);switch(e){case 0:r=h,e=1;break;case 1:n[i++]=r<<2|(48&h)>>4,r=h,e=2;break;case 2:n[i++]=(15&r)<<4|(60&h)>>2,r=h,e=3;break;case 3:n[i++]=(3&r)<<6|h,e=0}}if(1===e)throw Error(c);return i-u},r.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,n){function i(){this.t={}}(n.exports=i).prototype.on=function(t,n,i){return(this.t[t]||(this.t[t]=[])).push({fn:n,ctx:i||this}),this},i.prototype.off=function(t,n){if(t===d)this.t={};else if(n===d)this.t[t]=[];else for(var i=this.t[t],r=0;r<i.length;)i[r].fn===n?i.splice(r,1):++r;return this},i.prototype.emit=function(t){var n=this.t[t];if(n){for(var i=[],r=1;r<arguments.length;)i.push(arguments[r++]);for(r=0;r<n.length;)n[r].fn.apply(n[r++].ctx,i)}return this}},{}],4:[function(t,n){function i(t){function n(t,n,i,r){var u=n<0?1:0;if(u&&(n=-n),0===n)t(0<1/n?0:2147483648,i,r);else if(isNaN(n))t(2143289344,i,r);else if(34028234663852886e22<n)t((u<<31|2139095040)>>>0,i,r);else if(n<11754943508222875e-54)t((u<<31|Math.round(n/1401298464324817e-60))>>>0,i,r);else{var e=Math.floor(Math.log(n)/Math.LN2);t((u<<31|127+e<<23|8388607&Math.round(n*Math.pow(2,-e)*8388608))>>>0,i,r)}}function i(t,n,i){var r=t(n,i),u=2*(r>>31)+1,e=r>>>23&255,s=8388607&r;return 255==e?s?NaN:1/0*u:0==e?1401298464324817e-60*u*s:u*Math.pow(2,e-150)*(8388608+s)}function r(t,n,i){h[0]=t,n[i]=f[0],n[i+1]=f[1],n[i+2]=f[2],n[i+3]=f[3]}function u(t,n,i){h[0]=t,n[i]=f[3],n[i+1]=f[2],n[i+2]=f[1],n[i+3]=f[0]}function e(t,n){return f[0]=t[n],f[1]=t[n+1],f[2]=t[n+2],f[3]=t[n+3],h[0]}function s(t,n){return f[3]=t[n],f[2]=t[n+1],f[1]=t[n+2],f[0]=t[n+3],h[0]}var h,f,o,c,a,l;function v(t,n,i,r,u,e){var s=r<0?1:0;if(s&&(r=-r),0===r)t(0,u,e+n),t(0<1/r?0:2147483648,u,e+i);else if(isNaN(r))t(0,u,e+n),t(2146959360,u,e+i);else if(17976931348623157e292<r)t(0,u,e+n),t((s<<31|2146435072)>>>0,u,e+i);else{var h;if(r<22250738585072014e-324)t((h=r/5e-324)>>>0,u,e+n),t((s<<31|h/4294967296)>>>0,u,e+i);else{var f=Math.floor(Math.log(r)/Math.LN2);1024===f&&(f=1023),t(4503599627370496*(h=r*Math.pow(2,-f))>>>0,u,e+n),t((s<<31|f+1023<<20|1048576*h&1048575)>>>0,u,e+i)}}}function w(t,n,i,r,u){var e=t(r,u+n),s=t(r,u+i),h=2*(s>>31)+1,f=s>>>20&2047,o=4294967296*(1048575&s)+e;return 2047==f?o?NaN:1/0*h:0==f?5e-324*h*o:h*Math.pow(2,f-1075)*(o+4503599627370496)}function y(t,n,i){c[0]=t,n[i]=a[0],n[i+1]=a[1],n[i+2]=a[2],n[i+3]=a[3],n[i+4]=a[4],n[i+5]=a[5],n[i+6]=a[6],n[i+7]=a[7]}function b(t,n,i){c[0]=t,n[i]=a[7],n[i+1]=a[6],n[i+2]=a[5],n[i+3]=a[4],n[i+4]=a[3],n[i+5]=a[2],n[i+6]=a[1],n[i+7]=a[0]}function d(t,n){return a[0]=t[n],a[1]=t[n+1],a[2]=t[n+2],a[3]=t[n+3],a[4]=t[n+4],a[5]=t[n+5],a[6]=t[n+6],a[7]=t[n+7],c[0]}function g(t,n){return a[7]=t[n],a[6]=t[n+1],a[5]=t[n+2],a[4]=t[n+3],a[3]=t[n+4],a[2]=t[n+5],a[1]=t[n+6],a[0]=t[n+7],c[0]}return"undefined"!=typeof Float32Array?(h=new Float32Array([-0]),f=new Uint8Array(h.buffer),o=128===f[3],t.writeFloatLE=o?r:u,t.writeFloatBE=o?u:r,t.readFloatLE=o?e:s,t.readFloatBE=o?s:e):(t.writeFloatLE=n.bind(null,A),t.writeFloatBE=n.bind(null,p),t.readFloatLE=i.bind(null,m),t.readFloatBE=i.bind(null,j)),"undefined"!=typeof Float64Array?(c=new Float64Array([-0]),a=new Uint8Array(c.buffer),l=128===a[7],t.writeDoubleLE=l?y:b,t.writeDoubleBE=l?b:y,t.readDoubleLE=l?d:g,t.readDoubleBE=l?g:d):(t.writeDoubleLE=v.bind(null,A,0,4),t.writeDoubleBE=v.bind(null,p,4,0),t.readDoubleLE=w.bind(null,m,0,4),t.readDoubleBE=w.bind(null,j,4,0)),t}function A(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}function p(t,n,i){n[i]=t>>>24,n[i+1]=t>>>16&255,n[i+2]=t>>>8&255,n[i+3]=255&t}function m(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)>>>0}function j(t,n){return(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])>>>0}n.exports=i(i)},{}],5:[function(t,n,i){function r(t){try{var n=eval("require")(t);if(n&&(n.length||Object.keys(n).length))return n}catch(t){}return null}n.exports=r},{}],6:[function(t,n){n.exports=function(i,r,t){var u=t||8192,e=u>>>1,s=null,h=u;return function(t){if(t<1||e<t)return i(t);u<h+t&&(s=i(u),h=0);var n=r.call(s,h,h+=t);return 7&h&&(h=1+(7|h)),n}}},{}],7:[function(t,n,i){var r=i;r.length=function(t){for(var n=0,i=0,r=0;r<t.length;++r)(i=t.charCodeAt(r))<128?n+=1:i<2048?n+=2:55296==(64512&i)&&56320==(64512&t.charCodeAt(r+1))?(++r,n+=4):n+=3;return n},r.read=function(t,n,i){if(i-n<1)return"";for(var r,u=null,e=[],s=0;n<i;)(r=t[n++])<128?e[s++]=r:191<r&&r<224?e[s++]=(31&r)<<6|63&t[n++]:239<r&&r<365?(r=((7&r)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,e[s++]=55296+(r>>10),e[s++]=56320+(1023&r)):e[s++]=(15&r)<<12|(63&t[n++])<<6|63&t[n++],8191<s&&((u=u||[]).push(String.fromCharCode.apply(String,e)),s=0);return u?(s&&u.push(String.fromCharCode.apply(String,e.slice(0,s))),u.join("")):String.fromCharCode.apply(String,e.slice(0,s))},r.write=function(t,n,i){for(var r,u,e=i,s=0;s<t.length;++s)(r=t.charCodeAt(s))<128?n[i++]=r:(r<2048?n[i++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(u=t.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&u),++s,n[i++]=r>>18|240,n[i++]=r>>12&63|128):n[i++]=r>>12|224,n[i++]=r>>6&63|128),n[i++]=63&r|128);return i-e}},{}],8:[function(t,n,i){var r=i;function u(){r.util.n(),r.Writer.n(r.BufferWriter),r.Reader.n(r.BufferReader)}r.build="minimal",r.Writer=t(16),r.BufferWriter=t(17),r.Reader=t(9),r.BufferReader=t(10),r.util=t(15),r.rpc=t(12),r.roots=t(11),(r.configure=u)()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(t,n){n.exports=h;var i,r=t(15),u=r.LongBits,e=r.utf8;function s(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length}function f(){return r.Buffer?function(t){return(h.create=function(t){return r.Buffer.isBuffer(t)?new i(t):c(t)})(t)}:c}var o,c="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function a(){var t=new u(0,0),n=0;if(!(4<this.len-this.pos)){for(;n<3;++n){if(this.pos>=this.len)throw s(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*n)>>>0,t}for(;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(n=0,4<this.len-this.pos){for(;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(;n<5;++n){if(this.pos>=this.len)throw s(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function l(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function v(){if(this.pos+8>this.len)throw s(this,8);return new u(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}h.create=f(),h.prototype.i=r.Array.prototype.subarray||r.Array.prototype.slice,h.prototype.uint32=(o=4294967295,function(){if(o=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return o;if(o=(o|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return o;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return o}),h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){return 0!==this.uint32()},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return l(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|l(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var t=r.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var t=r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw s(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(n,i):n===i?new this.buf.constructor(0):this.i.call(this.buf,n,i)},h.prototype.string=function(){var t=this.bytes();return e.read(t,0,t.length)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw s(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},h.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h.n=function(t){i=t,h.create=f(),i.n();var n=r.Long?"toLong":"toNumber";r.merge(h.prototype,{int64:function(){return a.call(this)[n](!1)},uint64:function(){return a.call(this)[n](!0)},sint64:function(){return a.call(this).zzDecode()[n](!1)},fixed64:function(){return v.call(this)[n](!0)},sfixed64:function(){return v.call(this)[n](!1)}})}},{15:15}],10:[function(t,n){n.exports=u;var i=t(9);(u.prototype=Object.create(i.prototype)).constructor=u;var r=t(15);function u(t){i.call(this,t)}u.n=function(){r.Buffer&&(u.prototype.i=r.Buffer.prototype.slice)},u.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},u.n()},{15:15,9:9}],11:[function(t,n){n.exports={}},{}],12:[function(t,n,i){i.Service=t(13)},{13:13}],13:[function(t,n){n.exports=i;var h=t(15);function i(t,n,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");h.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!n,this.responseDelimited=!!i}((i.prototype=Object.create(h.EventEmitter.prototype)).constructor=i).prototype.rpcCall=function t(i,n,r,u,e){if(!u)throw TypeError("request must be specified");var s=this;if(!e)return h.asPromise(t,s,i,n,r,u);if(!s.rpcImpl)return setTimeout(function(){e(Error("already ended"))},0),d;try{return s.rpcImpl(i,n[s.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(t,n){if(t)return s.emit("error",t,i),e(t);if(null===n)return s.end(!0),d;if(!(n instanceof r))try{n=r[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return s.emit("error",t,i),e(t)}return s.emit("data",n,i),e(null,n)})}catch(t){return s.emit("error",t,i),setTimeout(function(){e(t)},0),d}},i.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(t,n){n.exports=u;var i=t(15);function u(t,n){this.lo=t>>>0,this.hi=n>>>0}var e=u.zero=new u(0,0);e.toNumber=function(){return 0},e.zzEncode=e.zzDecode=function(){return this},e.length=function(){return 1};var r=u.zeroHash="\0\0\0\0\0\0\0\0";u.fromNumber=function(t){if(0===t)return e;var n=t<0;n&&(t=-t);var i=t>>>0,r=(t-i)/4294967296>>>0;return n&&(r=~r>>>0,i=~i>>>0,4294967295<++i&&(i=0,4294967295<++r&&(r=0))),new u(i,r)},u.from=function(t){if("number"==typeof t)return u.fromNumber(t);if(i.isString(t)){if(!i.Long)return u.fromNumber(parseInt(t,10));t=i.Long.fromString(t)}return t.low||t.high?new u(t.low>>>0,t.high>>>0):e},u.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var n=1+~this.lo>>>0,i=~this.hi>>>0;return n||(i=i+1>>>0),-(n+4294967296*i)}return this.lo+4294967296*this.hi},u.prototype.toLong=function(t){return i.Long?new i.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;u.fromHash=function(t){return t===r?e:new u((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},u.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},u.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},u.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},u.prototype.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0==i?0==n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10}},{15:15}],15:[function(t,n,i){var r=i;function u(t,n,i){for(var r=Object.keys(n),u=0;u<r.length;++u)t[r[u]]!==d&&i||(t[r[u]]=n[r[u]]);return t}function e(t){function i(t,n){if(!(this instanceof i))return new i(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:Error().stack||""}),n&&u(this,n)}return(i.prototype=Object.create(Error.prototype)).constructor=i,Object.defineProperty(i.prototype,"name",{get:function(){return t}}),i.prototype.toString=function(){return this.name+": "+this.message},i}r.asPromise=t(1),r.base64=t(2),r.EventEmitter=t(3),r.float=t(4),r.inquire=t(5),r.utf8=t(7),r.pool=t(6),r.LongBits=t(14),r.isNode=!!("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,n){var i=t[n];return null!=i&&t.hasOwnProperty(n)&&("object"!=typeof i||0<(Array.isArray(i)?i.length:Object.keys(i).length))},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r.r=null,r.u=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r.u(t):new r.Array(t):r.Buffer?r.r(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,n){var i=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(i.lo,i.hi,n):i.toNumber(!!n)},r.merge=u,r.lcFirst=function(t){return t[0].toLowerCase()+t.substring(1)},r.newError=e,r.ProtocolError=e("ProtocolError"),r.oneOfGetter=function(t){for(var i={},n=0;n<t.length;++n)i[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;-1<n;--n)if(1===i[t[n]]&&this[t[n]]!==d&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(i){return function(t){for(var n=0;n<i.length;++n)i[n]!==t&&delete this[i[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r.n=function(){var i=r.Buffer;i?(r.r=i.from!==Uint8Array.from&&i.from||function(t,n){return new i(t,n)},r.u=i.allocUnsafe||function(t){return new i(t)}):r.r=r.u=null}},{1:1,14:14,2:2,3:3,4:4,5:5,6:6,7:7}],16:[function(t,n){n.exports=c;var i,r=t(15),u=r.LongBits,e=r.base64,s=r.utf8;function h(t,n,i){this.fn=t,this.len=n,this.next=d,this.val=i}function f(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function c(){this.len=0,this.head=new h(f,0,0),this.tail=this.head,this.states=null}function a(){return r.Buffer?function(){return(c.create=function(){return new i})()}:function(){return new c}}function l(t,n,i){n[i]=255&t}function v(t,n){this.len=t,this.next=d,this.val=n}function w(t,n,i){for(;t.hi;)n[i++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;127<t.lo;)n[i++]=127&t.lo|128,t.lo=t.lo>>>7;n[i++]=t.lo}function y(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}c.create=a(),c.alloc=function(t){return new r.Array(t)},r.Array!==Array&&(c.alloc=r.pool(c.alloc,r.Array.prototype.subarray)),c.prototype.e=function(t,n,i){return this.tail=this.tail.next=new h(t,n,i),this.len+=n,this},(v.prototype=Object.create(h.prototype)).fn=function(t,n,i){for(;127<t;)n[i++]=127&t|128,t>>>=7;n[i]=t},c.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new v((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},c.prototype.int32=function(t){return t<0?this.e(w,10,u.fromNumber(t)):this.uint32(t)},c.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},c.prototype.int64=c.prototype.uint64=function(t){var n=u.from(t);return this.e(w,n.length(),n)},c.prototype.sint64=function(t){var n=u.from(t).zzEncode();return this.e(w,n.length(),n)},c.prototype.bool=function(t){return this.e(l,1,t?1:0)},c.prototype.sfixed32=c.prototype.fixed32=function(t){return this.e(y,4,t>>>0)},c.prototype.sfixed64=c.prototype.fixed64=function(t){var n=u.from(t);return this.e(y,4,n.lo).e(y,4,n.hi)},c.prototype.float=function(t){return this.e(r.float.writeFloatLE,4,t)},c.prototype.double=function(t){return this.e(r.float.writeDoubleLE,8,t)};var b=r.Array.prototype.set?function(t,n,i){n.set(t,i)}:function(t,n,i){for(var r=0;r<t.length;++r)n[i+r]=t[r]};c.prototype.bytes=function(t){var n=t.length>>>0;if(!n)return this.e(l,1,0);if(r.isString(t)){var i=c.alloc(n=e.length(t));e.decode(t,i,0),t=i}return this.uint32(n).e(b,n,t)},c.prototype.string=function(t){var n=s.length(t);return n?this.uint32(n).e(s.write,n,t):this.e(l,1,0)},c.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new h(f,0,0),this.len=0,this},c.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new h(f,0,0),this.len=0),this},c.prototype.ldelim=function(){var t=this.head,n=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=n,this.len+=i),this},c.prototype.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,n,i),i+=t.len,t=t.next;return n},c.n=function(t){i=t,c.create=a(),i.n()}},{15:15}],17:[function(t,n){n.exports=u;var i=t(16);(u.prototype=Object.create(i.prototype)).constructor=u;var r=t(15);function u(){i.call(this)}function e(t,n,i){t.length<40?r.utf8.write(t,n,i):n.utf8Write?n.utf8Write(t,i):n.write(t,i)}u.n=function(){u.alloc=r.u,u.writeBytesBuffer=r.Buffer&&r.Buffer.prototype instanceof Uint8Array&&"set"===r.Buffer.prototype.set.name?function(t,n,i){n.set(t,i)}:function(t,n,i){if(t.copy)t.copy(n,i,0,t.length);else for(var r=0;r<t.length;)n[i++]=t[r++]}},u.prototype.bytes=function(t){r.isString(t)&&(t=r.r(t,"base64"));var n=t.length>>>0;return this.uint32(n),n&&this.e(u.writeBytesBuffer,n,t),this},u.prototype.string=function(t){var n=r.Buffer.byteLength(t);return this.uint32(n),n&&this.e(e,n,t),this},u.n()},{15:15,16:16}]},u={},t=[8],n=function t(n){var i=u[n];return i||r[n][0].call(i=u[n]={exports:{}},t,i,i.exports),i.exports}(t[0]),n.util.global.protobuf=n,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(n.util.Long=t,n.configure()),n}),"object"==typeof module&&module&&module.exports&&(module.exports=n)}();
8
+ //# sourceMappingURL=protobuf.min.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "ver": "4.0.24",
3
+ "importer": "javascript",
4
+ "imported": true,
5
+ "uuid": "e9228609-1489-4f1f-a41c-0b5059e0dd78",
6
+ "files": [],
7
+ "subMetas": {},
8
+ "userData": {}
9
+ }
@@ -0,0 +1,102 @@
1
+ declare global {
2
+ // DO NOT EDIT! This is a generated file. Edit the JSDoc in src/*.js instead and run 'npm run types'.
3
+
4
+ /** Namespace proto. */
5
+ export namespace proto {
6
+
7
+ /** Cmd enum. */
8
+ enum Cmd {
9
+ Push = 999,
10
+ UserLogin = 1000
11
+ }
12
+
13
+ /** Properties of a UserLoginReq. */
14
+ interface IUserLoginReq {
15
+
16
+ /** UserLoginReq token */
17
+ token: string;
18
+
19
+ /** UserLoginReq serverId */
20
+ serverId?: (number|null);
21
+
22
+ /** UserLoginReq machineId */
23
+ machineId?: (string|null);
24
+ }
25
+
26
+ /** Represents a UserLoginReq. */
27
+ class UserLoginReq implements IUserLoginReq {
28
+
29
+ /**
30
+ * Constructs a new UserLoginReq.
31
+ * @param [p] Properties to set
32
+ */
33
+ constructor(p?: proto.IUserLoginReq);
34
+
35
+ /** UserLoginReq token. */
36
+ public token: string;
37
+
38
+ /** UserLoginReq serverId. */
39
+ public serverId: number;
40
+
41
+ /** UserLoginReq machineId. */
42
+ public machineId: string;
43
+
44
+ /**
45
+ * Encodes the specified UserLoginReq message. Does not implicitly {@link proto.UserLoginReq.verify|verify} messages.
46
+ * @param m UserLoginReq message or plain object to encode
47
+ * @param [w] Writer to encode to
48
+ * @returns Writer
49
+ */
50
+ public static encode(m: proto.IUserLoginReq, w?: protobuf.Writer): protobuf.Writer;
51
+
52
+ /**
53
+ * Decodes a UserLoginReq message from the specified reader or buffer.
54
+ * @param r Reader or buffer to decode from
55
+ * @param [l] Message length if known beforehand
56
+ * @returns UserLoginReq
57
+ * @throws {Error} If the payload is not a reader or valid buffer
58
+ * @throws {protobuf.util.ProtocolError} If required fields are missing
59
+ */
60
+ public static decode(r: (protobuf.Reader|Uint8Array), l?: number): proto.UserLoginReq;
61
+ }
62
+
63
+ /** Properties of a UserLoginResp. */
64
+ interface IUserLoginResp {
65
+
66
+ /** UserLoginResp userId */
67
+ userId?: (number|null);
68
+ }
69
+
70
+ /** Represents a UserLoginResp. */
71
+ class UserLoginResp implements IUserLoginResp {
72
+
73
+ /**
74
+ * Constructs a new UserLoginResp.
75
+ * @param [p] Properties to set
76
+ */
77
+ constructor(p?: proto.IUserLoginResp);
78
+
79
+ /** UserLoginResp userId. */
80
+ public userId: number;
81
+
82
+ /**
83
+ * Encodes the specified UserLoginResp message. Does not implicitly {@link proto.UserLoginResp.verify|verify} messages.
84
+ * @param m UserLoginResp message or plain object to encode
85
+ * @param [w] Writer to encode to
86
+ * @returns Writer
87
+ */
88
+ public static encode(m: proto.IUserLoginResp, w?: protobuf.Writer): protobuf.Writer;
89
+
90
+ /**
91
+ * Decodes a UserLoginResp message from the specified reader or buffer.
92
+ * @param r Reader or buffer to decode from
93
+ * @param [l] Message length if known beforehand
94
+ * @returns UserLoginResp
95
+ * @throws {Error} If the payload is not a reader or valid buffer
96
+ * @throws {protobuf.util.ProtocolError} If required fields are missing
97
+ */
98
+ public static decode(r: (protobuf.Reader|Uint8Array), l?: number): proto.UserLoginResp;
99
+ }
100
+ }
101
+ }
102
+ export {}
@@ -0,0 +1,9 @@
1
+ {
2
+ "ver": "4.0.24",
3
+ "importer": "typescript",
4
+ "imported": true,
5
+ "uuid": "9105bd62-64e7-4460-b096-3e6f8b3fb445",
6
+ "files": [],
7
+ "subMetas": {},
8
+ "userData": {}
9
+ }
@@ -0,0 +1,222 @@
1
+ // Common aliases
2
+ var $Reader = protobuf.Reader, $Writer = protobuf.Writer, $util = protobuf.util;
3
+
4
+ // Exported root namespace
5
+ var $root = protobuf.roots.creator || (protobuf.roots.creator = $util.global);
6
+
7
+ $root.proto = (function() {
8
+
9
+ /**
10
+ * Namespace proto.
11
+ * @exports proto
12
+ * @namespace
13
+ */
14
+ var proto = {};
15
+
16
+ /**
17
+ * Cmd enum.
18
+ * @name proto.Cmd
19
+ * @enum {number}
20
+ * @property {number} Push=999 Push value
21
+ * @property {number} UserLogin=1000 UserLogin value
22
+ */
23
+ proto.Cmd = (function() {
24
+ var valuesById = {}, values = Object.create(valuesById);
25
+ values[valuesById[999] = "Push"] = 999;
26
+ values[valuesById[1000] = "UserLogin"] = 1000;
27
+ return values;
28
+ })();
29
+
30
+ proto.UserLoginReq = (function() {
31
+
32
+ /**
33
+ * Properties of a UserLoginReq.
34
+ * @memberof proto
35
+ * @interface IUserLoginReq
36
+ * @property {string} token UserLoginReq token
37
+ * @property {number|null} [serverId] UserLoginReq serverId
38
+ * @property {string|null} [machineId] UserLoginReq machineId
39
+ */
40
+
41
+ /**
42
+ * Constructs a new UserLoginReq.
43
+ * @memberof proto
44
+ * @classdesc Represents a UserLoginReq.
45
+ * @implements IUserLoginReq
46
+ * @constructor
47
+ * @param {proto.IUserLoginReq=} [p] Properties to set
48
+ */
49
+ function UserLoginReq(p) {
50
+ if (p)
51
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
52
+ if (p[ks[i]] != null)
53
+ this[ks[i]] = p[ks[i]];
54
+ }
55
+
56
+ /**
57
+ * UserLoginReq token.
58
+ * @member {string} token
59
+ * @memberof proto.UserLoginReq
60
+ * @instance
61
+ */
62
+ UserLoginReq.prototype.token = "";
63
+
64
+ /**
65
+ * UserLoginReq serverId.
66
+ * @member {number} serverId
67
+ * @memberof proto.UserLoginReq
68
+ * @instance
69
+ */
70
+ UserLoginReq.prototype.serverId = 0;
71
+
72
+ /**
73
+ * UserLoginReq machineId.
74
+ * @member {string} machineId
75
+ * @memberof proto.UserLoginReq
76
+ * @instance
77
+ */
78
+ UserLoginReq.prototype.machineId = "";
79
+
80
+ /**
81
+ * Encodes the specified UserLoginReq message. Does not implicitly {@link proto.UserLoginReq.verify|verify} messages.
82
+ * @function encode
83
+ * @memberof proto.UserLoginReq
84
+ * @static
85
+ * @param {proto.IUserLoginReq} m UserLoginReq message or plain object to encode
86
+ * @param {protobuf.Writer} [w] Writer to encode to
87
+ * @returns {protobuf.Writer} Writer
88
+ */
89
+ UserLoginReq.encode = function encode(m, w) {
90
+ if (!w)
91
+ w = $Writer.create();
92
+ w.uint32(10).string(m.token);
93
+ if (m.serverId != null && Object.hasOwnProperty.call(m, "serverId"))
94
+ w.uint32(16).int32(m.serverId);
95
+ if (m.machineId != null && Object.hasOwnProperty.call(m, "machineId"))
96
+ w.uint32(26).string(m.machineId);
97
+ return w;
98
+ };
99
+
100
+ /**
101
+ * Decodes a UserLoginReq message from the specified reader or buffer.
102
+ * @function decode
103
+ * @memberof proto.UserLoginReq
104
+ * @static
105
+ * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
106
+ * @param {number} [l] Message length if known beforehand
107
+ * @returns {proto.UserLoginReq} UserLoginReq
108
+ * @throws {Error} If the payload is not a reader or valid buffer
109
+ * @throws {protobuf.util.ProtocolError} If required fields are missing
110
+ */
111
+ UserLoginReq.decode = function decode(r, l) {
112
+ if (!(r instanceof $Reader))
113
+ r = $Reader.create(r);
114
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.UserLoginReq();
115
+ while (r.pos < c) {
116
+ var t = r.uint32();
117
+ switch (t >>> 3) {
118
+ case 1:
119
+ m.token = r.string();
120
+ break;
121
+ case 2:
122
+ m.serverId = r.int32();
123
+ break;
124
+ case 3:
125
+ m.machineId = r.string();
126
+ break;
127
+ default:
128
+ r.skipType(t & 7);
129
+ break;
130
+ }
131
+ }
132
+ if (!m.hasOwnProperty("token"))
133
+ throw $util.ProtocolError("missing required 'token'", { instance: m });
134
+ return m;
135
+ };
136
+
137
+ return UserLoginReq;
138
+ })();
139
+
140
+ proto.UserLoginResp = (function() {
141
+
142
+ /**
143
+ * Properties of a UserLoginResp.
144
+ * @memberof proto
145
+ * @interface IUserLoginResp
146
+ * @property {number|null} [userId] UserLoginResp userId
147
+ */
148
+
149
+ /**
150
+ * Constructs a new UserLoginResp.
151
+ * @memberof proto
152
+ * @classdesc Represents a UserLoginResp.
153
+ * @implements IUserLoginResp
154
+ * @constructor
155
+ * @param {proto.IUserLoginResp=} [p] Properties to set
156
+ */
157
+ function UserLoginResp(p) {
158
+ if (p)
159
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
160
+ if (p[ks[i]] != null)
161
+ this[ks[i]] = p[ks[i]];
162
+ }
163
+
164
+ /**
165
+ * UserLoginResp userId.
166
+ * @member {number} userId
167
+ * @memberof proto.UserLoginResp
168
+ * @instance
169
+ */
170
+ UserLoginResp.prototype.userId = 0;
171
+
172
+ /**
173
+ * Encodes the specified UserLoginResp message. Does not implicitly {@link proto.UserLoginResp.verify|verify} messages.
174
+ * @function encode
175
+ * @memberof proto.UserLoginResp
176
+ * @static
177
+ * @param {proto.IUserLoginResp} m UserLoginResp message or plain object to encode
178
+ * @param {protobuf.Writer} [w] Writer to encode to
179
+ * @returns {protobuf.Writer} Writer
180
+ */
181
+ UserLoginResp.encode = function encode(m, w) {
182
+ if (!w)
183
+ w = $Writer.create();
184
+ if (m.userId != null && Object.hasOwnProperty.call(m, "userId"))
185
+ w.uint32(8).int32(m.userId);
186
+ return w;
187
+ };
188
+
189
+ /**
190
+ * Decodes a UserLoginResp message from the specified reader or buffer.
191
+ * @function decode
192
+ * @memberof proto.UserLoginResp
193
+ * @static
194
+ * @param {protobuf.Reader|Uint8Array} r Reader or buffer to decode from
195
+ * @param {number} [l] Message length if known beforehand
196
+ * @returns {proto.UserLoginResp} UserLoginResp
197
+ * @throws {Error} If the payload is not a reader or valid buffer
198
+ * @throws {protobuf.util.ProtocolError} If required fields are missing
199
+ */
200
+ UserLoginResp.decode = function decode(r, l) {
201
+ if (!(r instanceof $Reader))
202
+ r = $Reader.create(r);
203
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.UserLoginResp();
204
+ while (r.pos < c) {
205
+ var t = r.uint32();
206
+ switch (t >>> 3) {
207
+ case 1:
208
+ m.userId = r.int32();
209
+ break;
210
+ default:
211
+ r.skipType(t & 7);
212
+ break;
213
+ }
214
+ }
215
+ return m;
216
+ };
217
+
218
+ return UserLoginResp;
219
+ })();
220
+
221
+ return proto;
222
+ })();
@@ -0,0 +1,9 @@
1
+ {
2
+ "ver": "4.0.24",
3
+ "importer": "javascript",
4
+ "imported": true,
5
+ "uuid": "1e51e9bf-372d-46ad-a452-ef95831a74dc",
6
+ "files": [],
7
+ "subMetas": {},
8
+ "userData": {}
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "ver": "1.2.0",
3
+ "importer": "directory",
4
+ "imported": true,
5
+ "uuid": "af27dda4-779e-48b0-bd0b-e46dca736a15",
6
+ "files": [],
7
+ "subMetas": {},
8
+ "userData": {}
9
+ }
@@ -0,0 +1,6 @@
1
+ package proto;
2
+
3
+ enum Cmd {
4
+ Push = 999; // 服务器主动推送
5
+ UserLogin = 1000; // 用户登陆
6
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "ver": "1.0.1",
3
+ "importer": "text",
4
+ "imported": true,
5
+ "uuid": "e354be6a-e655-4dd4-a405-a7ab48e366fd",
6
+ "files": [
7
+ ".json"
8
+ ],
9
+ "subMetas": {},
10
+ "userData": {}
11
+ }
@@ -0,0 +1,12 @@
1
+ package proto;
2
+
3
+ // 登录请求
4
+ message UserLoginReq {
5
+ required string token = 1;
6
+ optional int32 serverId = 2; // 登录游戏时 需要传递游戏的serverId
7
+ optional string machineId = 3; // 登录设备号
8
+ }
9
+ // 登录响应
10
+ message UserLoginResp {
11
+ optional int32 userId = 1;
12
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "ver": "1.0.1",
3
+ "importer": "text",
4
+ "imported": true,
5
+ "uuid": "0dc3cea2-b1f0-4f18-a659-62dcd6a1d3e5",
6
+ "files": [
7
+ ".json"
8
+ ],
9
+ "subMetas": {},
10
+ "userData": {}
11
+ }
@@ -0,0 +1,24 @@
1
+ syntax = "proto3";
2
+
3
+ package base;
4
+ option java_package = "com.game.tafang.protocol";
5
+ option java_outer_classname = "BaseProto";
6
+
7
+ // 通用响应头
8
+ message ResponseHeader {
9
+ int32 code = 1; // 响应码:200=成功,其他=错误码
10
+ string msg = 2; // 响应消息
11
+ int64 server_time = 3; // 服务器时间戳
12
+ }
13
+
14
+ // 二维浮点坐标(世界坐标,用于移动、动画)
15
+ message Vector2 {
16
+ float x = 1; // X坐标
17
+ float y = 2; // Y坐标
18
+ }
19
+
20
+ // 二维整数坐标(网格坐标,用于建造、寻路)
21
+ message GridPos {
22
+ int32 x = 1; // 网格X坐标
23
+ int32 y = 2; // 网格Y坐标
24
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "ver": "1.0.1",
3
+ "importer": "text",
4
+ "imported": true,
5
+ "uuid": "aa4456da-9112-4dd0-8d9c-00a4077f9120",
6
+ "files": [
7
+ ".json"
8
+ ],
9
+ "subMetas": {},
10
+ "userData": {}
11
+ }
@@ -0,0 +1,31 @@
1
+ syntax = "proto3";
2
+
3
+ package command;
4
+ option java_package = "com.game.tafang.protocol";
5
+ option java_outer_classname = "CommandProto";
6
+
7
+ // 所有命令码统一定义(避免冲突)
8
+ enum CommandType {
9
+
10
+ //未知类型
11
+ CMD_UNKNOWN = 0;
12
+
13
+ //同步类型心跳
14
+ CMD_HEARTBEAT = 1000;
15
+
16
+ //用户认证
17
+ CMD_AUTH = 1001;
18
+
19
+ // 玩家模块
20
+ CMD_PLAYER_LOGIN = 1100;
21
+
22
+ // 防御塔模块
23
+ CMD_TOWER_BUILD = 1200;
24
+
25
+ // 战斗模块
26
+ CMD_BATTLE_START_WAVE = 1300;
27
+
28
+ /** 推送类命令 */
29
+ //BOSS帧同步状态
30
+ CMD_PUSH_BOOS_FRAME = 1400;
31
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "ver": "1.0.1",
3
+ "importer": "text",
4
+ "imported": true,
5
+ "uuid": "4db8881d-a16f-4c79-92a2-096dbfadeeef",
6
+ "files": [
7
+ ".json"
8
+ ],
9
+ "subMetas": {},
10
+ "userData": {}
11
+ }
@@ -0,0 +1,13 @@
1
+ syntax = "proto3";
2
+
3
+ package domain;
4
+ option java_package = "com.game.tafang.protocol.domain";
5
+ option java_outer_classname = "BossBattleInfoProto";
6
+
7
+ // Boos战斗请求对象
8
+ message BoosBattleRequest {
9
+ //本次伤害值
10
+ int32 damage = 1;
11
+ //技能ID
12
+ int32 skillId = 2;
13
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "ver": "1.0.1",
3
+ "importer": "text",
4
+ "imported": true,
5
+ "uuid": "fa040ce8-fe32-4f7b-99c1-e2a578f2da7e",
6
+ "files": [
7
+ ".json"
8
+ ],
9
+ "subMetas": {},
10
+ "userData": {}
11
+ }
@@ -0,0 +1,26 @@
1
+ syntax = "proto3";
2
+
3
+ package domain;
4
+ option java_package = "com.game.tafang.protocol.domain";
5
+ option java_outer_classname = "PlayerAuthProto";
6
+
7
+ // 玩家认证对象
8
+ message PlayerAuthRequest {
9
+ string token = 1;
10
+ }
11
+
12
+ //玩家信息
13
+ message PlayerInfoResponse {
14
+
15
+ //玩家ID(登录后绑定)
16
+ int64 playerId = 1;
17
+
18
+ //玩家名称
19
+ string playerName = 2;
20
+
21
+ //当前所在游戏房间ID
22
+ int64 roomId = 3;
23
+
24
+ //最后活跃时间戳
25
+ int64 lastActiveTime = 4;
26
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "ver": "1.0.1",
3
+ "importer": "text",
4
+ "imported": true,
5
+ "uuid": "2f5b5896-889b-4591-8fd6-5b1de5db3cd9",
6
+ "files": [
7
+ ".json"
8
+ ],
9
+ "subMetas": {},
10
+ "userData": {}
11
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "ver": "1.2.0",
3
+ "importer": "directory",
4
+ "imported": true,
5
+ "uuid": "54ee8686-699f-41a1-9e92-d5f5919d795d",
6
+ "files": [],
7
+ "subMetas": {},
8
+ "userData": {}
9
+ }
@@ -0,0 +1,23 @@
1
+ syntax = "proto3";
2
+
3
+ package message;
4
+ option java_package = "com.game.tafang.protocol.message";
5
+ option java_outer_classname = "GamePushProto";
6
+
7
+ import "command.proto";
8
+ import "push/boss_battle_events.proto";
9
+
10
+ // ========== 通用推送 ==========
11
+ message GamePush {
12
+ //命令
13
+ command.CommandType cmd = 1;
14
+ // 推送唯一ID
15
+ int64 push_id = 2;
16
+ // 服务器时间戳
17
+ int64 timestamp = 3;
18
+ //信息
19
+ oneof content {
20
+ //boos战斗同步信息
21
+ push.BossBattleSync boos_battle = 10;
22
+ }
23
+ }