diff --git a/xiaofang/Assets/Plugins/System.Buffers.dll b/xiaofang/Assets/Plugins/System.Buffers.dll new file mode 100644 index 00000000..b6d9c778 Binary files /dev/null and b/xiaofang/Assets/Plugins/System.Buffers.dll differ diff --git a/xiaofang/Assets/Plugins/System.Buffers.dll.meta b/xiaofang/Assets/Plugins/System.Buffers.dll.meta new file mode 100644 index 00000000..1364311b --- /dev/null +++ b/xiaofang/Assets/Plugins/System.Buffers.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 981e61f2f9d05f14080ac9c319bce628 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Plugins/System.Memory.dll b/xiaofang/Assets/Plugins/System.Memory.dll new file mode 100644 index 00000000..bdfc501e Binary files /dev/null and b/xiaofang/Assets/Plugins/System.Memory.dll differ diff --git a/xiaofang/Assets/Plugins/System.Memory.dll.meta b/xiaofang/Assets/Plugins/System.Memory.dll.meta new file mode 100644 index 00000000..63093feb --- /dev/null +++ b/xiaofang/Assets/Plugins/System.Memory.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: da0a789a7c2e0f541b10c9faf4986ab5 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Scenes/Tmap 1.meta b/xiaofang/Assets/Scenes/Tmap 1.meta new file mode 100644 index 00000000..5e785f7c --- /dev/null +++ b/xiaofang/Assets/Scenes/Tmap 1.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5b1839bbbe1e494faf78bb0559cda3a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Scenes/Tmap 1.unity b/xiaofang/Assets/Scenes/Tmap 1.unity index 273b30c2..02e14b0c 100644 --- a/xiaofang/Assets/Scenes/Tmap 1.unity +++ b/xiaofang/Assets/Scenes/Tmap 1.unity @@ -12660,6 +12660,68 @@ Transform: m_CorrespondingSourceObject: {fileID: 434342, guid: dae965d9ed8802048877e54ec2f0be78, type: 3} m_PrefabInstance: {fileID: 1517804048} m_PrefabAsset: {fileID: 0} +--- !u!1 &1526740600 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1526740602} + - component: {fileID: 1526740601} + - component: {fileID: 1526740603} + m_Layer: 0 + m_Name: GameObject (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1526740601 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1526740600} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c68b1dcfbba61b44ca68572c16b16b95, type: 3} + m_Name: + m_EditorClassIdentifier: + token: + wEBScriptListener: {fileID: 1526740603} +--- !u!4 &1526740602 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1526740600} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 27 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1526740603 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1526740600} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 44720823678ca7c42a08f4409ab025ff, type: 3} + m_Name: + m_EditorClassIdentifier: + serverIP: ws://192.168.3.110 + serverPort: 8445 + type: --- !u!1001 &1542437476 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/xiaofang/Assets/Scenes/Tmap 1/NavMesh.asset b/xiaofang/Assets/Scenes/Tmap 1/NavMesh.asset new file mode 100644 index 00000000..10fbd808 Binary files /dev/null and b/xiaofang/Assets/Scenes/Tmap 1/NavMesh.asset differ diff --git a/xiaofang/Assets/Scenes/Tmap 1/NavMesh.asset.meta b/xiaofang/Assets/Scenes/Tmap 1/NavMesh.asset.meta new file mode 100644 index 00000000..d236576f --- /dev/null +++ b/xiaofang/Assets/Scenes/Tmap 1/NavMesh.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ce317dc0bb78cd54b84bef351461ff44 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 23800000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Script/NewBehaviourScript.cs b/xiaofang/Assets/Script/NewBehaviourScript.cs new file mode 100644 index 00000000..b6fd2ae3 --- /dev/null +++ b/xiaofang/Assets/Script/NewBehaviourScript.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class NewBehaviourScript : MonoBehaviour +{ + + public int id = 0; + public int tpey = 90; + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } +} diff --git a/xiaofang/Assets/Script/NewBehaviourScript.cs.meta b/xiaofang/Assets/Script/NewBehaviourScript.cs.meta new file mode 100644 index 00000000..0f49c629 --- /dev/null +++ b/xiaofang/Assets/Script/NewBehaviourScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1728088f42a981c4da46a58c56c1cc84 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Script/login/login.cs b/xiaofang/Assets/Script/login/login.cs index 14de276e..72f23698 100644 --- a/xiaofang/Assets/Script/login/login.cs +++ b/xiaofang/Assets/Script/login/login.cs @@ -6,9 +6,9 @@ public class auth_login { public string clientId = "e5cd7e4891bf95d1d19206ce24a7b32e"; public string grantType = "password"; - public string userType = "sys_user"; - public string username = "adminyyl"; - public string password = "admin123"; + public string userType = "company_user"; + public string username = "13699802230"; + public string password = "YYL2230!"; } public class login : MonoBehaviour @@ -22,7 +22,7 @@ public class login : MonoBehaviour public async void loging() { auth_login auth_Login = new auth_login(); - + Debug.Log(JsonUtility.ToJson(auth_Login)); string response = await web.SendRequest(web.URL + "/auth/login", "POST", JsonUtility.ToJson(auth_Login)); Debug.Log(response); // 解析服务器返回的数据 diff --git a/xiaofang/Assets/UnityWebSocket.meta b/xiaofang/Assets/UnityWebSocket.meta new file mode 100644 index 00000000..2e2d52f2 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4a48e5bab43b85341bcf6c0f41824959 +folderAsset: yes +timeCreated: 1530672403 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Demo.meta b/xiaofang/Assets/UnityWebSocket/Demo.meta new file mode 100644 index 00000000..ea78ec31 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Demo.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aab4c0dd88d44cd4e817c3f1994407b4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Demo/DemoScene.unity b/xiaofang/Assets/UnityWebSocket/Demo/DemoScene.unity new file mode 100644 index 00000000..38a1099e --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Demo/DemoScene.unity @@ -0,0 +1,242 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 2 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &516737225 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 516737226} + - component: {fileID: 516737227} + m_Layer: 0 + m_Name: Main + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &516737226 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 516737225} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &516737227 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 516737225} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c1b55962346f6de40bd5e924df2854fb, type: 3} + m_Name: + m_EditorClassIdentifier: + address: wss://echo.websocket.events + subProtocols: soap|wamp + sendText: Hello UnityWebSocket! +--- !u!1 &902376145 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 902376148} + - component: {fileID: 902376147} + - component: {fileID: 902376146} + m_Layer: 0 + m_Name: Camera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &902376146 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 902376145} + m_Enabled: 1 +--- !u!20 &902376147 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 902376145} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.3301887, g: 0.3301887, b: 0.3301887, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &902376148 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 902376145} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/xiaofang/Assets/UnityWebSocket/Demo/DemoScene.unity.meta b/xiaofang/Assets/UnityWebSocket/Demo/DemoScene.unity.meta new file mode 100644 index 00000000..772fdf86 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Demo/DemoScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 65671216fb4e42d4f89ed6eeca36060d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Demo/UnityWebSocketDemo.cs b/xiaofang/Assets/UnityWebSocket/Demo/UnityWebSocketDemo.cs new file mode 100644 index 00000000..0fb0a3a0 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Demo/UnityWebSocketDemo.cs @@ -0,0 +1,200 @@ +锘縰sing UnityEngine; + +namespace UnityWebSocket.Demo +{ + public class UnityWebSocketDemo : MonoBehaviour + { + public string address = "wss://echo.websocket.events"; + public string sendText = "Hello UnityWebSocket!"; + + private IWebSocket socket; + + private bool logMessage = true; + private string log = ""; + private int sendCount; + private int receiveCount; + private Vector2 scrollPos; + private Color green = new Color(0.1f, 1, 0.1f); + private Color red = new Color(1f, 0.1f, 0.1f); + private Color wait = new Color(0.7f, 0.3f, 0.3f); + + private void OnGUI() + { + var scale = Screen.width / 800f; + GUI.matrix = Matrix4x4.TRS(new Vector3(0, 0, 0), Quaternion.identity, new Vector3(scale, scale, 1)); + var width = GUILayout.Width(Screen.width / scale - 10); + + WebSocketState state = socket == null ? WebSocketState.Closed : socket.ReadyState; + + // draw header + GUILayout.BeginHorizontal(); + GUILayout.Label("SDK Version: " + Settings.VERSION, GUILayout.Width(Screen.width / scale - 100)); + GUI.color = green; + GUILayout.Label($"FPS: {fps:F2}", GUILayout.Width(80)); + GUI.color = Color.white; + GUILayout.EndHorizontal(); + + // draw websocket state + GUILayout.BeginHorizontal(); + GUILayout.Label("State: ", GUILayout.Width(36)); + GUI.color = WebSocketState.Closed == state ? red : WebSocketState.Open == state ? green : wait; + GUILayout.Label($"{state}", GUILayout.Width(120)); + GUI.color = Color.white; + GUILayout.EndHorizontal(); + + // draw address + GUI.enabled = state == WebSocketState.Closed; + GUILayout.Label("Address: ", width); + address = GUILayout.TextField(address, width); + + // draw connect button + GUILayout.BeginHorizontal(); + GUI.enabled = state == WebSocketState.Closed; + if (GUILayout.Button(state == WebSocketState.Connecting ? "Connecting..." : "Connect")) + { + socket = new WebSocket(address); + socket.OnOpen += Socket_OnOpen; + socket.OnMessage += Socket_OnMessage; + socket.OnClose += Socket_OnClose; + socket.OnError += Socket_OnError; + AddLog(string.Format("Connecting...")); + socket.ConnectAsync(); + } + + // draw close button + GUI.enabled = state == WebSocketState.Open; + if (GUILayout.Button(state == WebSocketState.Closing ? "Closing..." : "Close")) + { + AddLog(string.Format("Closing...")); + socket.CloseAsync(); + } + GUILayout.EndHorizontal(); + + // draw input message + GUILayout.Label("Message: "); + sendText = GUILayout.TextArea(sendText, GUILayout.MinHeight(50), width); + + // draw send message button + GUILayout.BeginHorizontal(); + if (GUILayout.Button("Send") && !string.IsNullOrEmpty(sendText)) + { + socket.SendAsync(sendText); + AddLog(string.Format("Send: {0}", sendText)); + sendCount += 1; + } + if (GUILayout.Button("Send Bytes") && !string.IsNullOrEmpty(sendText)) + { + var bytes = System.Text.Encoding.UTF8.GetBytes(sendText); + socket.SendAsync(bytes); + AddLog(string.Format("Send Bytes ({1}): {0}", sendText, bytes.Length)); + sendCount += 1; + } + if (GUILayout.Button("Send x100") && !string.IsNullOrEmpty(sendText)) + { + for (int i = 0; i < 100; i++) + { + var text = (i + 1).ToString() + ". " + sendText; + socket.SendAsync(text); + AddLog(string.Format("Send: {0}", text)); + sendCount += 1; + } + } + if (GUILayout.Button("Send Bytes x100") && !string.IsNullOrEmpty(sendText)) + { + for (int i = 0; i < 100; i++) + { + var text = (i + 1).ToString() + ". " + sendText; + var bytes = System.Text.Encoding.UTF8.GetBytes(text); + socket.SendAsync(bytes); + AddLog(string.Format("Send Bytes ({1}): {0}", text, bytes.Length)); + sendCount += 1; + } + } + GUILayout.EndHorizontal(); + + // draw message count + GUI.enabled = true; + GUILayout.BeginHorizontal(); + logMessage = GUILayout.Toggle(logMessage, "Log Message"); + GUILayout.Label(string.Format("Send Count: {0}", sendCount)); + GUILayout.Label(string.Format("Receive Count: {0}", receiveCount)); + GUILayout.EndHorizontal(); + + // draw clear button + if (GUILayout.Button("Clear")) + { + log = ""; + receiveCount = 0; + sendCount = 0; + } + + // draw message content + scrollPos = GUILayout.BeginScrollView(scrollPos, GUILayout.MaxHeight(Screen.height / scale - 270), width); + GUILayout.Label(log); + GUILayout.EndScrollView(); + } + + private void AddLog(string str) + { + if (!logMessage) return; + if (str.Length > 100) str = str.Substring(0, 100) + "..."; + log += str + "\n"; + if (log.Length > 22 * 1024) + { + log = log.Substring(log.Length - 22 * 1024); + } + scrollPos.y = int.MaxValue; + } + + private void Socket_OnOpen(object sender, OpenEventArgs e) + { + AddLog(string.Format("Connected: {0}", address)); + } + + private void Socket_OnMessage(object sender, MessageEventArgs e) + { + if (e.IsBinary) + { + AddLog(string.Format("Receive Bytes ({1}): {0}", e.Data, e.RawData.Length)); + } + else if (e.IsText) + { + AddLog(string.Format("Receive: {0}", e.Data)); + } + receiveCount += 1; + } + + private void Socket_OnClose(object sender, CloseEventArgs e) + { + AddLog(string.Format("Closed: StatusCode: {0}, Reason: {1}", e.StatusCode, e.Reason)); + } + + private void Socket_OnError(object sender, ErrorEventArgs e) + { + AddLog(string.Format("Error: {0}", e.Message)); + } + + private void OnApplicationQuit() + { + if (socket != null && socket.ReadyState != WebSocketState.Closed) + { + socket.CloseAsync(); + } + } + + private int frame = 0; + private float time = 0; + private float fps = 0; + private void Update() + { + frame += 1; + time += Time.deltaTime; + if (time >= 0.5f) + { + fps = frame / time; + frame = 0; + time = 0; + } + } + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Demo/UnityWebSocketDemo.cs.meta b/xiaofang/Assets/UnityWebSocket/Demo/UnityWebSocketDemo.cs.meta new file mode 100644 index 00000000..aa3c1474 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Demo/UnityWebSocketDemo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c1b55962346f6de40bd5e924df2854fb +timeCreated: 1466599118 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Plugins.meta b/xiaofang/Assets/UnityWebSocket/Plugins.meta new file mode 100644 index 00000000..820207ab --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Plugins.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4589fa9979d007040b5a807b0304b1ff +folderAsset: yes +timeCreated: 1466577973 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Plugins/WebGL.meta b/xiaofang/Assets/UnityWebSocket/Plugins/WebGL.meta new file mode 100644 index 00000000..404a7f6b --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Plugins/WebGL.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f1a1a6aea65cc413faf8fb4421138b29 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Plugins/WebGL/WebSocket.jslib b/xiaofang/Assets/UnityWebSocket/Plugins/WebGL/WebSocket.jslib new file mode 100644 index 00000000..2f6a6cb5 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Plugins/WebGL/WebSocket.jslib @@ -0,0 +1,338 @@ +var WebSocketLibrary = +{ + $webSocketManager: + { + /* + * Map of instances + * + * Instance structure: + * { + * url: string, + * ws: WebSocket, + * subProtocols: string[], + * } + */ + instances: {}, + + /* Last instance ID */ + lastId: 0, + + /* Event listeners */ + onOpen: null, + onMessage: null, + onMessageStr: null, + onError: null, + onClose: null + }, + + /** + * Set onOpen callback + * + * @param callback Reference to C# static function + */ + WebSocketSetOnOpen: function(callback) + { + webSocketManager.onOpen = callback; + }, + + /** + * Set onMessage callback + * + * @param callback Reference to C# static function + */ + WebSocketSetOnMessage: function(callback) + { + webSocketManager.onMessage = callback; + }, + + /** + * Set onMessageStr callback + * + * @param callback Reference to C# static function + */ + WebSocketSetOnMessageStr: function(callback) + { + webSocketManager.onMessageStr = callback; + }, + + /** + * Set onError callback + * + * @param callback Reference to C# static function + */ + WebSocketSetOnError: function(callback) + { + webSocketManager.onError = callback; + }, + + /** + * Set onClose callback + * + * @param callback Reference to C# static function + */ + WebSocketSetOnClose: function(callback) + { + webSocketManager.onClose = callback; + }, + + /** + * Allocate new WebSocket instance struct + * + * @param url Server URL + */ + WebSocketAllocate: function(urlPtr) + { + var url = UTF8ToString(urlPtr); + var id = ++webSocketManager.lastId; + webSocketManager.instances[id] = { + url: url, + ws: null, + }; + + return id; + }, + + /** + * Add Sub Protocol + * + * @param instanceId Instance ID + * @param protocol Sub Protocol + */ + WebSocketAddSubProtocol: function(instanceId, protocolPtr) + { + var instance = webSocketManager.instances[instanceId]; + if (!instance) return -1; + + var protocol = UTF8ToString(protocolPtr); + + if (instance.subProtocols == null) + instance.subProtocols = []; + + instance.subProtocols.push(protocol); + + return 0; + }, + + /** + * Remove reference to WebSocket instance + * + * If socket is not closed function will close it but onClose event will not be emitted because + * this function should be invoked by C# WebSocket destructor. + * + * @param instanceId Instance ID + */ + WebSocketFree: function(instanceId) + { + var instance = webSocketManager.instances[instanceId]; + if (!instance) return 0; + + // Close if not closed + if (instance.ws !== null && instance.ws.readyState < 2) + instance.ws.close(); + + // Remove reference + delete webSocketManager.instances[instanceId]; + + return 0; + }, + + /** + * Connect WebSocket to the server + * + * @param instanceId Instance ID + */ + WebSocketConnect: function(instanceId) + { + var instance = webSocketManager.instances[instanceId]; + if (!instance) return -1; + if (instance.ws !== null) return -2; + + if (instance.subProtocols != null) + instance.ws = new WebSocket(instance.url, instance.subProtocols); + else + instance.ws = new WebSocket(instance.url); + + instance.ws.onopen = function() + { + Module.dynCall_vi(webSocketManager.onOpen, instanceId); + }; + + instance.ws.onmessage = function(ev) + { + if (ev.data instanceof ArrayBuffer) + { + var array = new Uint8Array(ev.data); + var buffer = _malloc(array.length); + writeArrayToMemory(array, buffer); + try + { + Module.dynCall_viii(webSocketManager.onMessage, instanceId, buffer, array.length); + } + finally + { + _free(buffer); + } + } + else if (typeof ev.data == 'string') + { + var length = lengthBytesUTF8(ev.data) + 1; + var buffer = _malloc(length); + stringToUTF8(ev.data, buffer, length); + try + { + Module.dynCall_vii(webSocketManager.onMessageStr, instanceId, buffer); + } + finally + { + _free(buffer); + } + } + else if (typeof Blob !== 'undefined' && ev.data instanceof Blob) + { + var reader = new FileReader(); + reader.onload = function() + { + var array = new Uint8Array(reader.result); + var buffer = _malloc(array.length); + writeArrayToMemory(array, buffer); + try + { + Module.dynCall_viii(webSocketManager.onMessage, instanceId, buffer, array.length); + } + finally + { + reader = null; + _free(buffer); + } + }; + reader.readAsArrayBuffer(ev.data); + } + else + { + console.log("[JSLIB WebSocket] not support message type: ", (typeof ev.data)); + } + }; + + instance.ws.onerror = function(ev) + { + var msg = "WebSocket error."; + var length = lengthBytesUTF8(msg) + 1; + var buffer = _malloc(length); + stringToUTF8(msg, buffer, length); + try + { + Module.dynCall_vii(webSocketManager.onError, instanceId, buffer); + } + finally + { + _free(buffer); + } + }; + + instance.ws.onclose = function(ev) + { + var msg = ev.reason; + var length = lengthBytesUTF8(msg) + 1; + var buffer = _malloc(length); + stringToUTF8(msg, buffer, length); + try + { + Module.dynCall_viii(webSocketManager.onClose, instanceId, ev.code, buffer); + } + finally + { + _free(buffer); + } + instance.ws = null; + }; + + return 0; + }, + + /** + * Close WebSocket connection + * + * @param instanceId Instance ID + * @param code Close status code + * @param reasonPtr Pointer to reason string + */ + WebSocketClose: function(instanceId, code, reasonPtr) + { + var instance = webSocketManager.instances[instanceId]; + if (!instance) return -1; + if (instance.ws === null) return -3; + if (instance.ws.readyState === 2) return -4; + if (instance.ws.readyState === 3) return -5; + + var reason = ( reasonPtr ? UTF8ToString(reasonPtr) : undefined ); + try + { + instance.ws.close(code, reason); + } + catch (err) + { + return -7; + } + + return 0; + }, + + /** + * Send message over WebSocket + * + * @param instanceId Instance ID + * @param bufferPtr Pointer to the message buffer + * @param length Length of the message in the buffer + */ + WebSocketSend: function(instanceId, bufferPtr, length) + { + var instance = webSocketManager.instances[instanceId]; + if (!instance) return -1; + if (instance.ws === null) return -3; + if (instance.ws.readyState !== 1) return -6; + + if (typeof HEAPU8 !== 'undefined') + instance.ws.send(HEAPU8.buffer.slice(bufferPtr, bufferPtr + length)); + else if (typeof buffer !== 'undefined') + instance.ws.send(buffer.slice(bufferPtr, bufferPtr + length)); + else + return -8; // not support buffer slice + + return 0; + }, + + /** + * Send message string over WebSocket + * + * @param instanceId Instance ID + * @param stringPtr Pointer to the message string + */ + WebSocketSendStr: function(instanceId, stringPtr) + { + var instance = webSocketManager.instances[instanceId]; + if (!instance) return -1; + if (instance.ws === null) return -3; + if (instance.ws.readyState !== 1) return -6; + + instance.ws.send(UTF8ToString(stringPtr)); + + return 0; + }, + + /** + * Return WebSocket readyState + * + * @param instanceId Instance ID + */ + WebSocketGetState: function(instanceId) + { + var instance = webSocketManager.instances[instanceId]; + if (!instance) return -1; + if (instance.ws === null) return 3; // socket null as closed + + return instance.ws.readyState; + } +}; + +autoAddDeps(WebSocketLibrary, '$webSocketManager'); +mergeInto(LibraryManager.library, WebSocketLibrary); diff --git a/xiaofang/Assets/UnityWebSocket/Plugins/WebGL/WebSocket.jslib.meta b/xiaofang/Assets/UnityWebSocket/Plugins/WebGL/WebSocket.jslib.meta new file mode 100644 index 00000000..0d3f5887 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Plugins/WebGL/WebSocket.jslib.meta @@ -0,0 +1,42 @@ +fileFormatVersion: 2 +guid: bd88770aa13fc47b08f87d2145e9ac6e +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Facebook: WebGL + second: + enabled: 1 + settings: {} + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + WeixinMiniGame: WeixinMiniGame + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts.meta b/xiaofang/Assets/UnityWebSocket/Scripts.meta new file mode 100644 index 00000000..0a1e73b4 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 89cd0cf8603ef4069b2f6a5d79cbdbe1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Editor.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Editor.meta new file mode 100644 index 00000000..567ca440 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bb71bb4fb62590c4b975ef865b4df25f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Editor/SettingsWindow.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Editor/SettingsWindow.cs new file mode 100644 index 00000000..116e1cfc --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Editor/SettingsWindow.cs @@ -0,0 +1,212 @@ +锘縰sing UnityEngine; +using UnityEditor; +using UnityEngine.Networking; +using System.IO; +using System; + +namespace UnityWebSocket.Editor +{ + internal class SettingsWindow : EditorWindow + { + static SettingsWindow window = null; + [MenuItem("Tools/UnityWebSocket", priority = 100)] + internal static void Open() + { + if (window != null) + { + window.Close(); + } + + window = GetWindow(true, "UnityWebSocket"); + window.minSize = window.maxSize = new Vector2(600, 310); + window.Show(); + window.BeginCheck(); + } + + private void OnGUI() + { + DrawLogo(); + DrawVersion(); + DrawSeparator(80); + DrawSeparator(186); + DrawHelper(); + DrawFooter(); + } + + Texture2D logoTex = null; + private void DrawLogo() + { + if (logoTex == null) + { + logoTex = new Texture2D(66, 66); + logoTex.LoadImage(Convert.FromBase64String(LOGO_BASE64.VALUE)); + for (int i = 0; i < 66; i++) for (int j = 0; j < 15; j++) logoTex.SetPixel(i, j, Color.clear); + logoTex.Apply(); + } + + var logoPos = new Rect(10, 10, 66, 66); + GUI.DrawTexture(logoPos, logoTex); + var title = "UnityWebSocket"; + var titlePos = new Rect(80, 20, 500, 50); + GUI.Label(titlePos, title, TextStyle(24)); + } + + private void DrawSeparator(int y) + { + EditorGUI.DrawRect(new Rect(10, y, 580, 1), Color.white * 0.5f); + } + + private GUIStyle TextStyle(int fontSize = 10, TextAnchor alignment = TextAnchor.UpperLeft, float alpha = 0.85f) + { + var style = new GUIStyle(); + style.fontSize = fontSize; + style.normal.textColor = (EditorGUIUtility.isProSkin ? Color.white : Color.black) * alpha; + style.alignment = alignment; + style.richText = true; + return style; + } + + private void DrawVersion() + { + GUI.Label(new Rect(440, 10, 150, 10), "Current Version: " + Settings.VERSION, TextStyle(alignment: TextAnchor.MiddleLeft)); + if (string.IsNullOrEmpty(latestVersion)) + { + GUI.Label(new Rect(440, 30, 150, 10), "Checking for Updates...", TextStyle(alignment: TextAnchor.MiddleLeft)); + } + else if (latestVersion == "unknown") + { + + } + else + { + GUI.Label(new Rect(440, 30, 150, 10), "Latest Version: " + latestVersion, TextStyle(alignment: TextAnchor.MiddleLeft)); + if (Settings.VERSION == latestVersion) + { + if (GUI.Button(new Rect(440, 50, 150, 18), "Check Update")) + { + latestVersion = ""; + changeLog = ""; + BeginCheck(); + } + } + else + { + if (GUI.Button(new Rect(440, 50, 150, 18), "Update to | " + latestVersion)) + { + Application.OpenURL(Settings.GITHUB + "/releases"); + } + } + } + } + + private void DrawHelper() + { + GUI.Label(new Rect(330, 200, 100, 18), "GitHub:", TextStyle(10, TextAnchor.MiddleRight)); + if (GUI.Button(new Rect(440, 200, 150, 18), "UnityWebSocket")) + { + Application.OpenURL(Settings.GITHUB); + } + + GUI.Label(new Rect(330, 225, 100, 18), "Report:", TextStyle(10, TextAnchor.MiddleRight)); + if (GUI.Button(new Rect(440, 225, 150, 18), "Report an Issue")) + { + Application.OpenURL(Settings.GITHUB + "/issues/new"); + } + + GUI.Label(new Rect(330, 250, 100, 18), "Email:", TextStyle(10, TextAnchor.MiddleRight)); + if (GUI.Button(new Rect(440, 250, 150, 18), Settings.EMAIL)) + { + var uri = new Uri(string.Format("mailto:{0}?subject={1}", Settings.EMAIL, "UnityWebSocket Feedback")); + Application.OpenURL(uri.AbsoluteUri); + } + + GUI.Label(new Rect(330, 275, 100, 18), "QQ Group:", TextStyle(10, TextAnchor.MiddleRight)); + if (GUI.Button(new Rect(440, 275, 150, 18), Settings.QQ_GROUP)) + { + Application.OpenURL(Settings.QQ_GROUP_LINK); + } + } + + private void DrawFooter() + { + EditorGUI.DropShadowLabel(new Rect(10, 230, 400, 20), "Developed by " + Settings.AUHTOR); + EditorGUI.DropShadowLabel(new Rect(10, 250, 400, 20), "All rights reserved"); + } + + UnityWebRequest req; + string changeLog = ""; + string latestVersion = ""; + void BeginCheck() + { + EditorApplication.update -= VersionCheckUpdate; + EditorApplication.update += VersionCheckUpdate; + + req = UnityWebRequest.Get(Settings.GITHUB + "/releases/latest"); + req.SendWebRequest(); + } + + private void VersionCheckUpdate() + { +#if UNITY_2020_3_OR_NEWER + if (req == null + || req.result == UnityWebRequest.Result.ConnectionError + || req.result == UnityWebRequest.Result.DataProcessingError + || req.result == UnityWebRequest.Result.ProtocolError) +#elif UNITY_2018_1_OR_NEWER + if (req == null || req.isNetworkError || req.isHttpError) +#else + if (req == null || req.isError) +#endif + { + EditorApplication.update -= VersionCheckUpdate; + latestVersion = "unknown"; + return; + } + + if (req.isDone) + { + EditorApplication.update -= VersionCheckUpdate; + latestVersion = req.url.Substring(req.url.LastIndexOf("/") + 1).TrimStart('v'); + + if (Settings.VERSION != latestVersion) + { + var text = req.downloadHandler.text; + var st = text.IndexOf("content=\"" + latestVersion); + st = st > 0 ? text.IndexOf("\n", st) : -1; + var end = st > 0 ? text.IndexOf("\" />", st) : -1; + if (st > 0 && end > st) + { + changeLog = text.Substring(st + 1, end - st - 1).Trim(); + changeLog = changeLog.Replace("\r", ""); + changeLog = changeLog.Replace("\n", "\n- "); + changeLog = "\nCHANGE LOG: \n- " + changeLog + "\n"; + } + } + + Repaint(); + } + } + } + + internal static class LOGO_BASE64 + { + internal const string VALUE = "iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAMAAADUivDaAAAAq1BMVEUAAABKmtcvjtYzl" + + "9szmNszl9syl9k0mNs0mNwzmNs0mNszl9szl9s0mNs0mNwzmNw0mNwyltk0mNw0mNwzl9s0mNsymNs0mNszmNwzmNwzm" + + "NszmNs0mNwzl9w0mNwzmNw0mNs0mNs0mNwzl9wzmNs0mNwzmNs0mNwzl90zmNszmNszl9szmNsxmNszmNszmNw0mNwzm" + + "Nw0mNs2neM4pe41mt43ouo2oOY5qfM+UHlaAAAAMnRSTlMAAwXN3sgI+/069MSCK6M/MA74h9qfFHB8STWMJ9OSdmNcI" + + "8qya1IeF+/U0EIa57mqmFTYJe4AAAN3SURBVFjD7ZbpkppAFEa/bgVBREF2kEVGFNeZsM77P1kadURnJkr8k1Qlx1Khu" + + "/pw7+2lwH/+YcgfMBBLG7VocwDamzH+wJBB8Qhjve2f0TdrGwjei6o4Ub/nM/APw5Z7vvSB/qrCrqbD6fBEVtigeMxks" + + "fX9zWbj+z1jhqgSBplQ50eGo4614WXlRAzgrRhmtSfvxAn7pB0N5ObaKKZZuU5/d37IBcBgUQwqDuf7Z2gUmVAl4NGNr" + + "/UeHxV5n39ulbaKLI86h6HilmM5M1aN126lpNhtl59yeTsp8nUMvpNC1J3bh5FtfVRk+bJrJunn5d4U4piJ/Vw9eXgsj" + + "4ZpZaCjg9waZkIpnBWLJ44OwoNu60F2UnSaEkKv4XnAlCpm6B4F/aKMDiyGi2L8SEEAVdxNLuzmgV7nFwObEe2xQVuX+" + + "RV1lWetga3w+cN1sXgvm4cJH8OEgZC1DPKhfF/BIymmQrMjq/x65FUeEkDup8GxoexZmznHCvANtXU/CAq13yimhQGtm" + + "H4VCPnBBL1fTKo3CqEcvq7Lb/OwHxWTYlyw+JmjKoVvDLVOQB4pVsM8K8smgvLCxZDlIijwyOEc+nr/msMwK0+GQWGBd" + + "tmhjv8icTds1s2ammaFh04QLLe69NK7guP6mTDMaw3o6nAX/Z7EXUskPSvWEWg4srVlp5NTDXv9Lce9HGN5eeG4nj5Yz" + + "ACteU2wQLo4MBtJfd1nw5nG1/s9zwUQ6pykL1TQjqdeuvQW0naz2XKLYL4Cwzr4vj+OQdD96CSp7Lrynp4aeFF0xdm5q" + + "6OFtFfPv7URxpWJNjd/N+3+I9+1klMav12Qtgbt9R2JaIopjkzaPtOFq4KxUpqfUMSFnQrySWjLoQzRZS4HMH84ME1ej" + + "S1YJpQZ3B+sR1uCQJSBdGdCk1eAEgORR88KK05W8dh2MA+A/SKCYu3mCJ0Ek7HBx4HHeuwYy5G3x8hSMTJcOMFbinCsn" + + "hO1V1aszGULvA0g4UFsb4VA0hAFcyo6cgLsAoT7uUtGAH5wQKQle0wuLyxLTaNyJEYwxw4wSljLK1TP8CAaOyhBMMEsj" + + "OBoXgo7VGElFkSWL+vef1RF2YNXeRWYzQBTpkhC8KaZHhuIogArkQLKClBZjU26B2IZgGz+cpZkHl8g3fYUaW/YP2kb2" + + "M/V97JY/vZN859n+QmO7XtC9Bf2jAAAAABJRU5ErkJggg=="; + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Editor/SettingsWindow.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Editor/SettingsWindow.cs.meta new file mode 100644 index 00000000..ff291d9b --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Editor/SettingsWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7c42d421cc4c34f3eae1fbd67f0dced0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Editor/UnityWebSocket.Editor.asmdef b/xiaofang/Assets/UnityWebSocket/Scripts/Editor/UnityWebSocket.Editor.asmdef new file mode 100644 index 00000000..9ae7fa49 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Editor/UnityWebSocket.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "UnityWebSocket.Editor", + "references": [ + "UnityWebSocket.Runtime" + ], + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [] +} \ No newline at end of file diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Editor/UnityWebSocket.Editor.asmdef.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Editor/UnityWebSocket.Editor.asmdef.meta new file mode 100644 index 00000000..851d4552 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Editor/UnityWebSocket.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ee833745c57bd4369ab8f0ff380a96fa +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime.meta new file mode 100644 index 00000000..497f84bf --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53e0ed9fdc3af42eba12a5b1b9a5f873 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core.meta new file mode 100644 index 00000000..75a53494 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8b3a2a8f55d4a47f599b1fa3ed612389 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseEventArgs.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseEventArgs.cs new file mode 100644 index 00000000..d0d5831a --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseEventArgs.cs @@ -0,0 +1,89 @@ +using System; + +namespace UnityWebSocket +{ + /// + /// Represents the event data for the event. + /// + /// + /// + /// That event occurs when the WebSocket connection has been closed. + /// + /// + /// If you would like to get the reason for the close, you should access + /// the or property. + /// + /// + public class CloseEventArgs : EventArgs + { + #region Internal Constructors + + internal CloseEventArgs() + { + } + + internal CloseEventArgs(ushort code) + : this(code, null) + { + } + + internal CloseEventArgs(CloseStatusCode code) + : this((ushort)code, null) + { + } + + internal CloseEventArgs(CloseStatusCode code, string reason) + : this((ushort)code, reason) + { + } + + internal CloseEventArgs(ushort code, string reason) + { + Code = code; + Reason = reason; + } + + #endregion + + #region Public Properties + + /// + /// Gets the status code for the close. + /// + /// + /// A that represents the status code for the close if any. + /// + public ushort Code { get; private set; } + + /// + /// Gets the reason for the close. + /// + /// + /// A that represents the reason for the close if any. + /// + public string Reason { get; private set; } + + /// + /// Gets a value indicating whether the connection has been closed cleanly. + /// + /// + /// true if the connection has been closed cleanly; otherwise, false. + /// + public bool WasClean { get; internal set; } + + /// + /// Enum value same as Code + /// + public CloseStatusCode StatusCode + { + get + { + if (Enum.IsDefined(typeof(CloseStatusCode), Code)) + return (CloseStatusCode)Code; + return CloseStatusCode.Unknown; + } + } + + #endregion + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseEventArgs.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseEventArgs.cs.meta new file mode 100644 index 00000000..6e2a928a --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseEventArgs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 29b987d07ba15434cb1744135a7a5416 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseStatusCode.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseStatusCode.cs new file mode 100644 index 00000000..0da2ddbd --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseStatusCode.cs @@ -0,0 +1,91 @@ +namespace UnityWebSocket +{ + /// + /// Indicates the status code for the WebSocket connection close. + /// + /// + /// + /// The values of this enumeration are defined in + /// + /// Section 7.4 of RFC 6455. + /// + /// + /// "Reserved value" cannot be sent as a status code in + /// closing handshake by an endpoint. + /// + /// + public enum CloseStatusCode : ushort + { + Unknown = 65534, + /// + /// Equivalent to close status 1000. Indicates normal close. + /// + Normal = 1000, + /// + /// Equivalent to close status 1001. Indicates that an endpoint is + /// going away. + /// + Away = 1001, + /// + /// Equivalent to close status 1002. Indicates that an endpoint is + /// terminating the connection due to a protocol error. + /// + ProtocolError = 1002, + /// + /// Equivalent to close status 1003. Indicates that an endpoint is + /// terminating the connection because it has received a type of + /// data that it cannot accept. + /// + UnsupportedData = 1003, + /// + /// Equivalent to close status 1004. Still undefined. A Reserved value. + /// + Undefined = 1004, + /// + /// Equivalent to close status 1005. Indicates that no status code was + /// actually present. A Reserved value. + /// + NoStatus = 1005, + /// + /// Equivalent to close status 1006. Indicates that the connection was + /// closed abnormally. A Reserved value. + /// + Abnormal = 1006, + /// + /// Equivalent to close status 1007. Indicates that an endpoint is + /// terminating the connection because it has received a message that + /// contains data that is not consistent with the type of the message. + /// + InvalidData = 1007, + /// + /// Equivalent to close status 1008. Indicates that an endpoint is + /// terminating the connection because it has received a message that + /// violates its policy. + /// + PolicyViolation = 1008, + /// + /// Equivalent to close status 1009. Indicates that an endpoint is + /// terminating the connection because it has received a message that + /// is too big to process. + /// + TooBig = 1009, + /// + /// Equivalent to close status 1010. Indicates that a client is + /// terminating the connection because it has expected the server to + /// negotiate one or more extension, but the server did not return + /// them in the handshake response. + /// + MandatoryExtension = 1010, + /// + /// Equivalent to close status 1011. Indicates that a server is + /// terminating the connection because it has encountered an unexpected + /// condition that prevented it from fulfilling the request. + /// + ServerError = 1011, + /// + /// Equivalent to close status 1015. Indicates that the connection was + /// closed due to a failure to perform a TLS handshake. A Reserved value. + /// + TlsHandshakeFailure = 1015, + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseStatusCode.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseStatusCode.cs.meta new file mode 100644 index 00000000..48e96605 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/CloseStatusCode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4e34ee317292e4225a10427cc35f85ec +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/ErrorEventArgs.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/ErrorEventArgs.cs new file mode 100644 index 00000000..cfb91b87 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/ErrorEventArgs.cs @@ -0,0 +1,59 @@ +using System; + +namespace UnityWebSocket +{ + /// + /// Represents the event data for the event. + /// + /// + /// + /// That event occurs when the gets an error. + /// + /// + /// If you would like to get the error message, you should access + /// the property. + /// + /// + /// And if the error is due to an exception, you can get it by accessing + /// the property. + /// + /// + public class ErrorEventArgs : EventArgs + { + #region Internal Constructors + + internal ErrorEventArgs(string message) + : this(message, null) + { + } + + internal ErrorEventArgs(string message, Exception exception) + { + this.Message = message; + this.Exception = exception; + } + + #endregion + + #region Public Properties + + /// + /// Gets the exception that caused the error. + /// + /// + /// An instance that represents the cause of + /// the error if it is due to an exception; otherwise, . + /// + public Exception Exception { get; private set; } + + /// + /// Gets the error message. + /// + /// + /// A that represents the error message. + /// + public string Message { get; private set; } + + #endregion + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/ErrorEventArgs.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/ErrorEventArgs.cs.meta new file mode 100644 index 00000000..47a5055b --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/ErrorEventArgs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 884e7db60b6444154b7200e0e436f2de +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/IWebSocket.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/IWebSocket.cs new file mode 100644 index 00000000..3e08d4b5 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/IWebSocket.cs @@ -0,0 +1,143 @@ +锘縰sing System; + +namespace UnityWebSocket +{ + /// + /// IWebSocket indicate a network connection. + /// It can be connecting, connected, closing or closed state. + /// You can send and receive messages by using it. + /// Register callbacks for handling messages. + /// ----------------------------------------------------------- + /// IWebSocket 琛ㄧず涓涓綉缁滆繛鎺ワ紝 + /// 瀹冨彲浠ユ槸 connecting connected closing closed 鐘舵侊紝 + /// 鍙互鍙戦佸拰鎺ユ敹娑堟伅锛 + /// 閫氳繃娉ㄥ唽娑堟伅鍥炶皟锛屾潵澶勭悊鎺ユ敹鍒扮殑娑堟伅銆 + /// + public interface IWebSocket + { + /// + /// Establishes a connection asynchronously. + /// + /// + /// + /// This method does not wait for the connect process to be complete. + /// + /// + /// This method does nothing if the connection has already been + /// established. + /// + /// + /// + /// + /// This instance is not a client. + /// + /// + /// -or- + /// + /// + /// The close process is in progress. + /// + /// + /// -or- + /// + /// + /// A series of reconnecting has failed. + /// + /// + void ConnectAsync(); + + /// + /// Closes the connection asynchronously. + /// + /// + /// + /// This method does not wait for the close to be complete. + /// + /// + /// This method does nothing if the current state of the connection is + /// Closing or Closed. + /// + /// + void CloseAsync(); + + /// + /// Sends the specified data asynchronously using the WebSocket connection. + /// + /// + /// This method does not wait for the send to be complete. + /// + /// + /// An array of that represents the binary data to send. + /// + /// + /// The current state of the connection is not Open. + /// + /// + /// is . + /// + void SendAsync(byte[] data); + + /// + /// Sends the specified data using the WebSocket connection. + /// + /// + /// A that represents the text data to send. + /// + /// + /// The current state of the connection is not Open. + /// + /// + /// is . + /// + /// + /// could not be UTF-8 encoded. + /// + void SendAsync(string text); + + /// + /// get the address which to connect. + /// + string Address { get; } + + /// + /// get sub protocols . + /// + string[] SubProtocols { get; } + + /// + /// Gets the current state of the connection. + /// + /// + /// + /// One of the enum values. + /// + /// + /// It indicates the current state of the connection. + /// + /// + /// The default value is . + /// + /// + WebSocketState ReadyState { get; } + + /// + /// Occurs when the WebSocket connection has been established. + /// + event EventHandler OnOpen; + + /// + /// Occurs when the WebSocket connection has been closed. + /// + event EventHandler OnClose; + + /// + /// Occurs when the gets an error. + /// + event EventHandler OnError; + + /// + /// Occurs when the receives a message. + /// + event EventHandler OnMessage; + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/IWebSocket.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/IWebSocket.cs.meta new file mode 100644 index 00000000..ae658256 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/IWebSocket.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 37ee2146eb8c34ffab8b081a632b05cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/MessageEventArgs.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/MessageEventArgs.cs new file mode 100644 index 00000000..a80fbae8 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/MessageEventArgs.cs @@ -0,0 +1,115 @@ +using System; +using System.Text; + +namespace UnityWebSocket +{ + public class MessageEventArgs : EventArgs + { + private byte[] _rawData; + private string _data; + + internal MessageEventArgs(Opcode opcode, byte[] rawData) + { + Opcode = opcode; + _rawData = rawData; + } + + internal MessageEventArgs(Opcode opcode, string data) + { + Opcode = opcode; + _data = data; + } + + /// + /// Gets the opcode for the message. + /// + /// + /// , . + /// + internal Opcode Opcode { get; private set; } + + /// + /// Gets the message data as a . + /// + /// + /// A that represents the message data if its type is + /// text and if decoding it to a string has successfully done; + /// otherwise, . + /// + public string Data + { + get + { + SetData(); + return _data; + } + } + + /// + /// Gets the message data as an array of . + /// + /// + /// An array of that represents the message data. + /// + public byte[] RawData + { + get + { + SetRawData(); + return _rawData; + } + } + + /// + /// Gets a value indicating whether the message type is binary. + /// + /// + /// true if the message type is binary; otherwise, false. + /// + public bool IsBinary + { + get + { + return Opcode == Opcode.Binary; + } + } + + /// + /// Gets a value indicating whether the message type is text. + /// + /// + /// true if the message type is text; otherwise, false. + /// + public bool IsText + { + get + { + return Opcode == Opcode.Text; + } + } + + private void SetData() + { + if (_data != null) return; + + if (RawData == null) + { + return; + } + + _data = Encoding.UTF8.GetString(RawData); + } + + private void SetRawData() + { + if (_rawData != null) return; + + if (_data == null) + { + return; + } + + _rawData = Encoding.UTF8.GetBytes(_data); + } + } +} \ No newline at end of file diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/MessageEventArgs.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/MessageEventArgs.cs.meta new file mode 100644 index 00000000..1c3a7d13 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/MessageEventArgs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b44eda173b4924081bab76ae9d1b0a9c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Opcode.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Opcode.cs new file mode 100644 index 00000000..3e758e23 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Opcode.cs @@ -0,0 +1,26 @@ +namespace UnityWebSocket +{ + /// + /// Indicates the WebSocket frame type. + /// + /// + /// The values of this enumeration are defined in + /// + /// Section 5.2 of RFC 6455. + /// + public enum Opcode : byte + { + /// + /// Equivalent to numeric value 1. Indicates text frame. + /// + Text = 0x1, + /// + /// Equivalent to numeric value 2. Indicates binary frame. + /// + Binary = 0x2, + /// + /// Equivalent to numeric value 8. Indicates connection close frame. + /// + Close = 0x8, + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Opcode.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Opcode.cs.meta new file mode 100644 index 00000000..a7ed802f --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Opcode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eeac0ef90273544ebbae046672caf362 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/OpenEventArgs.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/OpenEventArgs.cs new file mode 100644 index 00000000..fa84a33d --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/OpenEventArgs.cs @@ -0,0 +1,11 @@ +using System; + +namespace UnityWebSocket +{ + public class OpenEventArgs : EventArgs + { + internal OpenEventArgs() + { + } + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/OpenEventArgs.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/OpenEventArgs.cs.meta new file mode 100644 index 00000000..0cfe2c2d --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/OpenEventArgs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5fb6fd704bd4e4b8ba63cd0b28712955 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Settings.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Settings.cs new file mode 100644 index 00000000..95fdd230 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Settings.cs @@ -0,0 +1,12 @@ +锘縩amespace UnityWebSocket +{ + public static class Settings + { + public const string GITHUB = "https://github.com/psygames/UnityWebSocket"; + public const string QQ_GROUP = "1126457634"; + public const string QQ_GROUP_LINK = "https://qm.qq.com/cgi-bin/qm/qr?k=KcexYJ9aYwogFXbj2aN0XHH5b2G7ICmd"; + public const string EMAIL = "799329256@qq.com"; + public const string AUHTOR = "psygames"; + public const string VERSION = "2.8.5"; + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Settings.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Settings.cs.meta new file mode 100644 index 00000000..e8e36229 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/Settings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e268303c7a605e343b1b132e5559f01f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/WebSocketState.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/WebSocketState.cs new file mode 100644 index 00000000..796ab15f --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/WebSocketState.cs @@ -0,0 +1,36 @@ +namespace UnityWebSocket +{ + /// + /// Reference html5 WebSocket ReadyState Properties + /// Indicates the state of a WebSocket connection. + /// + /// + /// The values of this enumeration are defined in + /// + /// The WebSocket API. + /// + public enum WebSocketState : ushort + { + /// + /// Equivalent to numeric value 0. Indicates that the connection has not + /// yet been established. + /// + Connecting = 0, + /// + /// Equivalent to numeric value 1. Indicates that the connection has + /// been established, and the communication is possible. + /// + Open = 1, + /// + /// Equivalent to numeric value 2. Indicates that the connection is + /// going through the closing handshake, or the close method has + /// been invoked. + /// + Closing = 2, + /// + /// Equivalent to numeric value 3. Indicates that the connection has + /// been closed or could not be established. + /// + Closed = 3 + } +} diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/WebSocketState.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/WebSocketState.cs.meta new file mode 100644 index 00000000..94877ec5 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Core/WebSocketState.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5f6567ad13cb147a59f8af784f1c5f60 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation.meta new file mode 100644 index 00000000..abb1981f --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 396c66b333d624d539153070900bb73b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL.meta new file mode 100644 index 00000000..dc70a45c --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6c110a898ae8b0b41bcf4da49c2b0425 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocket.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocket.cs new file mode 100644 index 00000000..3755dcf5 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocket.cs @@ -0,0 +1,329 @@ +锘#if !NET_LEGACY && (UNITY_EDITOR || !UNITY_WEBGL) +using System; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Net.WebSockets; +using System.IO; +using System.Collections.Concurrent; + +namespace UnityWebSocket +{ + public class WebSocket : IWebSocket + { + public string Address { get; private set; } + public string[] SubProtocols { get; private set; } + + public WebSocketState ReadyState + { + get + { + if (socket == null) + return WebSocketState.Closed; + switch (socket.State) + { + case System.Net.WebSockets.WebSocketState.Closed: + case System.Net.WebSockets.WebSocketState.None: + return WebSocketState.Closed; + case System.Net.WebSockets.WebSocketState.CloseReceived: + case System.Net.WebSockets.WebSocketState.CloseSent: + return WebSocketState.Closing; + case System.Net.WebSockets.WebSocketState.Connecting: + return WebSocketState.Connecting; + case System.Net.WebSockets.WebSocketState.Open: + return WebSocketState.Open; + } + return WebSocketState.Closed; + } + } + + public event EventHandler OnOpen; + public event EventHandler OnClose; + public event EventHandler OnError; + public event EventHandler OnMessage; + + private ClientWebSocket socket; + private bool isOpening => socket != null && socket.State == System.Net.WebSockets.WebSocketState.Open; + private ConcurrentQueue sendQueue = new ConcurrentQueue(); + private ConcurrentQueue eventQueue = new ConcurrentQueue(); + private bool closeProcessing; + private CancellationTokenSource cts = null; + + #region APIs + public WebSocket(string address) + { + this.Address = address; + } + + public WebSocket(string address, string subProtocol) + { + this.Address = address; + this.SubProtocols = new string[] { subProtocol }; + } + + public WebSocket(string address, string[] subProtocols) + { + this.Address = address; + this.SubProtocols = subProtocols; + } + + public void ConnectAsync() + { + if (socket != null) + { + HandleError(new Exception("Socket is busy.")); + return; + } + + WebSocketManager.Instance.Add(this); + + socket = new ClientWebSocket(); + cts = new CancellationTokenSource(); + + // support sub protocols + if (this.SubProtocols != null) + { + foreach (var protocol in this.SubProtocols) + { + if (string.IsNullOrEmpty(protocol)) continue; + Log($"Add Sub Protocol {protocol}"); + socket.Options.AddSubProtocol(protocol); + } + } + + Task.Run(ConnectTask); + } + + public void CloseAsync() + { + if (!isOpening) return; + closeProcessing = true; + } + + public void SendAsync(byte[] data) + { + if (!isOpening) return; + var buffer = new SendBuffer(data, WebSocketMessageType.Binary); + sendQueue.Enqueue(buffer); + } + + public void SendAsync(string text) + { + if (!isOpening) return; + var data = Encoding.UTF8.GetBytes(text); + var buffer = new SendBuffer(data, WebSocketMessageType.Text); + sendQueue.Enqueue(buffer); + } + #endregion + + class SendBuffer + { + public byte[] data; + public WebSocketMessageType type; + public SendBuffer(byte[] data, WebSocketMessageType type) + { + this.data = data; + this.type = type; + } + } + + private void CleanSendQueue() + { + while (sendQueue.TryDequeue(out var _)) ; + } + + private void CleanEventQueue() + { + while (eventQueue.TryDequeue(out var _)) ; + } + + private async Task ConnectTask() + { + Log("Connect Task Begin ..."); + + try + { + var uri = new Uri(Address); + await socket.ConnectAsync(uri, cts.Token); + } + catch (Exception e) + { + HandleError(e); + HandleClose((ushort)CloseStatusCode.Abnormal, e.Message); + return; + } + + HandleOpen(); + + Log("Connect Task Success !"); + + StartReceiveTask(); + StartSendTask(); + } + + private async void StartSendTask() + { + Log("Send Task Begin ..."); + + try + { + while (!closeProcessing && socket != null && cts != null && !cts.IsCancellationRequested) + { + while (!closeProcessing && sendQueue.Count > 0 && sendQueue.TryDequeue(out var buffer)) + { + Log($"Send, type: {buffer.type}, size: {buffer.data.Length}, queue left: {sendQueue.Count}"); + await socket.SendAsync(new ArraySegment(buffer.data), buffer.type, true, cts.Token); + } + Thread.Sleep(3); + } + if (closeProcessing && socket != null && cts != null && !cts.IsCancellationRequested) + { + CleanSendQueue(); + Log($"Close Send Begin ..."); + await socket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "Normal Closure", cts.Token); + Log($"Close Send Success !"); + } + } + catch (Exception e) + { + HandleError(e); + } + finally + { + closeProcessing = false; + } + + Log("Send Task End !"); + } + + private async void StartReceiveTask() + { + Log("Receive Task Begin ..."); + + string closeReason = ""; + ushort closeCode = 0; + bool isClosed = false; + var segment = new ArraySegment(new byte[8192]); + var ms = new MemoryStream(); + + try + { + while (!isClosed && !cts.IsCancellationRequested) + { + var result = await socket.ReceiveAsync(segment, cts.Token); + ms.Write(segment.Array, 0, result.Count); + if (!result.EndOfMessage) continue; + var data = ms.ToArray(); + ms.SetLength(0); + switch (result.MessageType) + { + case WebSocketMessageType.Binary: + HandleMessage(Opcode.Binary, data); + break; + case WebSocketMessageType.Text: + HandleMessage(Opcode.Text, data); + break; + case WebSocketMessageType.Close: + isClosed = true; + closeCode = (ushort)result.CloseStatus; + closeReason = result.CloseStatusDescription; + break; + } + } + } + catch (Exception e) + { + HandleError(e); + closeCode = (ushort)CloseStatusCode.Abnormal; + closeReason = e.Message; + } + finally + { + ms.Close(); + } + + HandleClose(closeCode, closeReason); + + Log("Receive Task End !"); + } + + private void SocketDispose() + { + Log("Dispose"); + WebSocketManager.Instance.Remove(this); + CleanSendQueue(); + CleanEventQueue(); + socket.Dispose(); + socket = null; + cts.Dispose(); + cts = null; + } + + private void HandleOpen() + { + Log("OnOpen"); + eventQueue.Enqueue(new OpenEventArgs()); + } + + private void HandleMessage(Opcode opcode, byte[] rawData) + { + Log($"OnMessage, type: {opcode}, size: {rawData.Length}"); + eventQueue.Enqueue(new MessageEventArgs(opcode, rawData)); + } + + private void HandleClose(ushort code, string reason) + { + Log($"OnClose, code: {code}, reason: {reason}"); + eventQueue.Enqueue(new CloseEventArgs(code, reason)); + } + + private void HandleError(Exception exception) + { + Log("OnError, error: " + exception.Message); + eventQueue.Enqueue(new ErrorEventArgs(exception.Message)); + } + + internal void Update() + { + while (eventQueue.Count > 0 && eventQueue.TryDequeue(out var e)) + { + if (e is CloseEventArgs) + { + OnClose?.Invoke(this, e as CloseEventArgs); + SocketDispose(); + break; + } + else if (e is OpenEventArgs) + { + OnOpen?.Invoke(this, e as OpenEventArgs); + } + else if (e is MessageEventArgs) + { + OnMessage?.Invoke(this, e as MessageEventArgs); + } + else if (e is ErrorEventArgs) + { + OnError?.Invoke(this, e as ErrorEventArgs); + } + } + } + + internal void Abort() + { + Log("Abort"); + if (cts != null) + { + cts.Cancel(); + } + } + + [System.Diagnostics.Conditional("UNITY_WEB_SOCKET_LOG")] + static void Log(string msg) + { + var time = DateTime.Now.ToString("HH:mm:ss.fff"); + var thread = Thread.CurrentThread.ManagedThreadId; + UnityEngine.Debug.Log($"[{time}][UnityWebSocket][T-{thread:D3}] {msg}"); + } + } +} +#endif diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocket.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocket.cs.meta new file mode 100644 index 00000000..cbb5e53a --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocket.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d10f88a23641b4beb8df74460fb7f705 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocketManager.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocketManager.cs new file mode 100644 index 00000000..edc79d4a --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocketManager.cs @@ -0,0 +1,74 @@ +锘#if !NET_LEGACY && (UNITY_EDITOR || !UNITY_WEBGL) +using System.Collections.Generic; +using UnityEngine; + +namespace UnityWebSocket +{ + [DisallowMultipleComponent] + [DefaultExecutionOrder(-10000)] + internal class WebSocketManager : MonoBehaviour + { + private const string rootName = "[UnityWebSocket]"; + private static WebSocketManager _instance; + public static WebSocketManager Instance + { + get + { + if (!_instance) CreateInstance(); + return _instance; + } + } + + private void Awake() + { + DontDestroyOnLoad(gameObject); + } + + public static void CreateInstance() + { + GameObject go = GameObject.Find("/" + rootName); + if (!go) go = new GameObject(rootName); + _instance = go.GetComponent(); + if (!_instance) _instance = go.AddComponent(); + } + + private readonly List sockets = new List(); + + public void Add(WebSocket socket) + { + if (!sockets.Contains(socket)) + sockets.Add(socket); + } + + public void Remove(WebSocket socket) + { + if (sockets.Contains(socket)) + sockets.Remove(socket); + } + + private void Update() + { + if (sockets.Count <= 0) return; + for (int i = sockets.Count - 1; i >= 0; i--) + { + sockets[i].Update(); + } + } + +#if UNITY_EDITOR + private void OnDisable() + { + SocketAbort(); + } + + private void SocketAbort() + { + for (int i = sockets.Count - 1; i >= 0; i--) + { + sockets[i].Abort(); + } + } +#endif + } +} +#endif \ No newline at end of file diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocketManager.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocketManager.cs.meta new file mode 100644 index 00000000..1e26dc8c --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/NoWebGL/WebSocketManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 99157fb5def394c83a9e5342036c92b0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL.meta new file mode 100644 index 00000000..e9c4e7b5 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1fb37927ec1ce4def9c5e7cff883f9f5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocket.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocket.cs new file mode 100644 index 00000000..e2858e9c --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocket.cs @@ -0,0 +1,147 @@ +锘#if !UNITY_EDITOR && UNITY_WEBGL +using System; + +namespace UnityWebSocket +{ + public class WebSocket : IWebSocket + { + public string Address { get; private set; } + public string[] SubProtocols { get; private set; } + public WebSocketState ReadyState { get { return (WebSocketState)WebSocketManager.WebSocketGetState(instanceId); } } + + public event EventHandler OnOpen; + public event EventHandler OnClose; + public event EventHandler OnError; + public event EventHandler OnMessage; + + internal int instanceId = 0; + + public WebSocket(string address) + { + this.Address = address; + AllocateInstance(); + } + + public WebSocket(string address, string subProtocol) + { + this.Address = address; + this.SubProtocols = new string[] { subProtocol }; + AllocateInstance(); + } + + public WebSocket(string address, string[] subProtocols) + { + this.Address = address; + this.SubProtocols = subProtocols; + AllocateInstance(); + } + + internal void AllocateInstance() + { + instanceId = WebSocketManager.AllocateInstance(this.Address); + Log($"Allocate socket with instanceId: {instanceId}"); + if (this.SubProtocols == null) return; + foreach (var protocol in this.SubProtocols) + { + if (string.IsNullOrEmpty(protocol)) continue; + Log($"Add Sub Protocol {protocol}, with instanceId: {instanceId}"); + int code = WebSocketManager.WebSocketAddSubProtocol(instanceId, protocol); + if (code < 0) + { + HandleOnError(GetErrorMessageFromCode(code)); + break; + } + } + } + + ~WebSocket() + { + Log($"Free socket with instanceId: {instanceId}"); + WebSocketManager.WebSocketFree(instanceId); + } + + public void ConnectAsync() + { + Log($"Connect with instanceId: {instanceId}"); + WebSocketManager.Add(this); + int code = WebSocketManager.WebSocketConnect(instanceId); + if (code < 0) HandleOnError(GetErrorMessageFromCode(code)); + } + + public void CloseAsync() + { + Log($"Close with instanceId: {instanceId}"); + int code = WebSocketManager.WebSocketClose(instanceId, (int)CloseStatusCode.Normal, "Normal Closure"); + if (code < 0) HandleOnError(GetErrorMessageFromCode(code)); + } + + public void SendAsync(string text) + { + Log($"Send, type: {Opcode.Text}, size: {text.Length}"); + int code = WebSocketManager.WebSocketSendStr(instanceId, text); + if (code < 0) HandleOnError(GetErrorMessageFromCode(code)); + } + + public void SendAsync(byte[] data) + { + Log($"Send, type: {Opcode.Binary}, size: {data.Length}"); + int code = WebSocketManager.WebSocketSend(instanceId, data, data.Length); + if (code < 0) HandleOnError(GetErrorMessageFromCode(code)); + } + + internal void HandleOnOpen() + { + Log("OnOpen"); + OnOpen?.Invoke(this, new OpenEventArgs()); + } + + internal void HandleOnMessage(byte[] rawData) + { + Log($"OnMessage, type: {Opcode.Binary}, size: {rawData.Length}"); + OnMessage?.Invoke(this, new MessageEventArgs(Opcode.Binary, rawData)); + } + + internal void HandleOnMessageStr(string data) + { + Log($"OnMessage, type: {Opcode.Text}, size: {data.Length}"); + OnMessage?.Invoke(this, new MessageEventArgs(Opcode.Text, data)); + } + + internal void HandleOnClose(ushort code, string reason) + { + Log($"OnClose, code: {code}, reason: {reason}"); + OnClose?.Invoke(this, new CloseEventArgs(code, reason)); + WebSocketManager.Remove(instanceId); + } + + internal void HandleOnError(string msg) + { + Log("OnError, error: " + msg); + OnError?.Invoke(this, new ErrorEventArgs(msg)); + } + + internal static string GetErrorMessageFromCode(int errorCode) + { + switch (errorCode) + { + case -1: return "WebSocket instance not found."; + case -2: return "WebSocket is already connected or in connecting state."; + case -3: return "WebSocket is not connected."; + case -4: return "WebSocket is already closing."; + case -5: return "WebSocket is already closed."; + case -6: return "WebSocket is not in open state."; + case -7: return "Cannot close WebSocket, An invalid code was specified or reason is too long."; + case -8: return "Not support buffer slice. "; + default: return $"Unknown error code {errorCode}."; + } + } + + [System.Diagnostics.Conditional("UNITY_WEB_SOCKET_LOG")] + static void Log(string msg) + { + var time = DateTime.Now.ToString("HH:mm:ss.fff"); + UnityEngine.Debug.Log($"[{time}][UnityWebSocket] {msg}"); + } + } +} +#endif diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocket.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocket.cs.meta new file mode 100644 index 00000000..ffe47c74 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocket.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 74a5b3c22251243d2a2f33e74741559d +timeCreated: 1466578513 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocketManager.cs b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocketManager.cs new file mode 100644 index 00000000..0bc0218d --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocketManager.cs @@ -0,0 +1,153 @@ +锘#if !UNITY_EDITOR && UNITY_WEBGL +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using AOT; + +namespace UnityWebSocket +{ + /// + /// Class providing static access methods to work with JSLIB WebSocket + /// + internal static class WebSocketManager + { + /* Map of websocket instances */ + private static Dictionary sockets = new Dictionary(); + + /* Delegates */ + public delegate void OnOpenCallback(int instanceId); + public delegate void OnMessageCallback(int instanceId, IntPtr msgPtr, int msgSize); + public delegate void OnMessageStrCallback(int instanceId, IntPtr msgStrPtr); + public delegate void OnErrorCallback(int instanceId, IntPtr errorPtr); + public delegate void OnCloseCallback(int instanceId, int closeCode, IntPtr reasonPtr); + + /* WebSocket JSLIB functions */ + [DllImport("__Internal")] + public static extern int WebSocketConnect(int instanceId); + + [DllImport("__Internal")] + public static extern int WebSocketClose(int instanceId, int code, string reason); + + [DllImport("__Internal")] + public static extern int WebSocketSend(int instanceId, byte[] dataPtr, int dataLength); + + [DllImport("__Internal")] + public static extern int WebSocketSendStr(int instanceId, string data); + + [DllImport("__Internal")] + public static extern int WebSocketGetState(int instanceId); + + /* WebSocket JSLIB callback setters and other functions */ + [DllImport("__Internal")] + public static extern int WebSocketAllocate(string url); + + [DllImport("__Internal")] + public static extern int WebSocketAddSubProtocol(int instanceId, string protocol); + + [DllImport("__Internal")] + public static extern void WebSocketFree(int instanceId); + + [DllImport("__Internal")] + public static extern void WebSocketSetOnOpen(OnOpenCallback callback); + + [DllImport("__Internal")] + public static extern void WebSocketSetOnMessage(OnMessageCallback callback); + + [DllImport("__Internal")] + public static extern void WebSocketSetOnMessageStr(OnMessageStrCallback callback); + + [DllImport("__Internal")] + public static extern void WebSocketSetOnError(OnErrorCallback callback); + + [DllImport("__Internal")] + public static extern void WebSocketSetOnClose(OnCloseCallback callback); + + /* If callbacks was initialized and set */ + private static bool isInitialized = false; + + /* Initialize WebSocket callbacks to JSLIB */ + private static void Initialize() + { + WebSocketSetOnOpen(DelegateOnOpenEvent); + WebSocketSetOnMessage(DelegateOnMessageEvent); + WebSocketSetOnMessageStr(DelegateOnMessageStrEvent); + WebSocketSetOnError(DelegateOnErrorEvent); + WebSocketSetOnClose(DelegateOnCloseEvent); + + isInitialized = true; + } + + [MonoPInvokeCallback(typeof(OnOpenCallback))] + public static void DelegateOnOpenEvent(int instanceId) + { + if (sockets.TryGetValue(instanceId, out var socket)) + { + socket.HandleOnOpen(); + } + } + + [MonoPInvokeCallback(typeof(OnMessageCallback))] + public static void DelegateOnMessageEvent(int instanceId, IntPtr msgPtr, int msgSize) + { + if (sockets.TryGetValue(instanceId, out var socket)) + { + var bytes = new byte[msgSize]; + Marshal.Copy(msgPtr, bytes, 0, msgSize); + socket.HandleOnMessage(bytes); + } + } + + [MonoPInvokeCallback(typeof(OnMessageStrCallback))] + public static void DelegateOnMessageStrEvent(int instanceId, IntPtr msgStrPtr) + { + if (sockets.TryGetValue(instanceId, out var socket)) + { + string msgStr = Marshal.PtrToStringAuto(msgStrPtr); + socket.HandleOnMessageStr(msgStr); + } + } + + [MonoPInvokeCallback(typeof(OnErrorCallback))] + public static void DelegateOnErrorEvent(int instanceId, IntPtr errorPtr) + { + if (sockets.TryGetValue(instanceId, out var socket)) + { + string errorMsg = Marshal.PtrToStringAuto(errorPtr); + socket.HandleOnError(errorMsg); + } + } + + [MonoPInvokeCallback(typeof(OnCloseCallback))] + public static void DelegateOnCloseEvent(int instanceId, int closeCode, IntPtr reasonPtr) + { + if (sockets.TryGetValue(instanceId, out var socket)) + { + string reason = Marshal.PtrToStringAuto(reasonPtr); + socket.HandleOnClose((ushort)closeCode, reason); + } + } + + internal static int AllocateInstance(string address) + { + if (!isInitialized) Initialize(); + return WebSocketAllocate(address); + } + + internal static void Add(WebSocket socket) + { + if (!sockets.ContainsKey(socket.instanceId)) + { + sockets.Add(socket.instanceId, socket); + } + } + + internal static void Remove(int instanceId) + { + if (sockets.ContainsKey(instanceId)) + { + sockets.Remove(instanceId); + } + } + } +} +#endif diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocketManager.cs.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocketManager.cs.meta new file mode 100644 index 00000000..d0a16fef --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/Implementation/WebGL/WebSocketManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 246cdc66a1e2047148371a8e56e17d3a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/UnityWebSocket.Runtime.asmdef b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/UnityWebSocket.Runtime.asmdef new file mode 100644 index 00000000..1dd0e569 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/UnityWebSocket.Runtime.asmdef @@ -0,0 +1,12 @@ +{ + "name": "UnityWebSocket.Runtime", + "references": [], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [] +} \ No newline at end of file diff --git a/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/UnityWebSocket.Runtime.asmdef.meta b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/UnityWebSocket.Runtime.asmdef.meta new file mode 100644 index 00000000..b25bd684 --- /dev/null +++ b/xiaofang/Assets/UnityWebSocket/Scripts/Runtime/UnityWebSocket.Runtime.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8b65d8710c3b04373a41cbf6b777ee65 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto.meta b/xiaofang/Assets/comm/Proto.meta new file mode 100644 index 00000000..6dadb82c --- /dev/null +++ b/xiaofang/Assets/comm/Proto.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 238d5690fe411f84da0c68ad5efd0d81 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/Config.cs b/xiaofang/Assets/comm/Proto/Config.cs new file mode 100644 index 00000000..4b9a1401 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Config.cs @@ -0,0 +1,83 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: config.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from config.proto +public static partial class ConfigReflection { + + #region Descriptor + /// File descriptor for config.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ConfigReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cgxjb25maWcucHJvdG8qnQEKCkVSUk9SX0NPREUSCgoGRVJSX09rEAASEAoM", + "RVJSX05vUGxheWVyEAESDgoKRVJSX05vUm9vbRACEg0KCUVSUl9Ub2tlbhAE", + "Eg0KCUVSUl9Mb2dpbhAFEg4KCkVSUl9BY3Rpb24QBhIOCgpFUlJfUGFyYW1z", + "EAcSDgoKRVJSX1NlcnZlchAIEhMKD0VSUl9Ob0F1dGhvcml0eRAJQgdaBS4v", + "O3BiYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ERROR_CODE), }, null, null)); + } + #endregion + +} +#region Enums +/// +///閿欒鐮 +/// +public enum ERROR_CODE { + /// + ///OK + /// + [pbr::OriginalName("ERR_Ok")] ErrOk = 0, + /// + ///娌℃湁杩欎釜鐜╁ + /// + [pbr::OriginalName("ERR_NoPlayer")] ErrNoPlayer = 1, + /// + ///鍔犲叆鎴块棿澶辫触 + /// + [pbr::OriginalName("ERR_NoRoom")] ErrNoRoom = 2, + /// + ///Token楠岃瘉澶辫触 + /// + [pbr::OriginalName("ERR_Token")] ErrToken = 4, + /// + ///鐧诲綍澶辫触 + /// + [pbr::OriginalName("ERR_Login")] ErrLogin = 5, + /// + ///鎿嶄綔澶辫触 + /// + [pbr::OriginalName("ERR_Action")] ErrAction = 6, + /// + ///鍙傛暟閿欒 + /// + [pbr::OriginalName("ERR_Params")] ErrParams = 7, + /// + ///鏈嶅姟鍣ㄥ唴閮ㄩ敊璇 + /// + [pbr::OriginalName("ERR_Server")] ErrServer = 8, + /// + ///娌℃湁鏉冮檺 + /// + [pbr::OriginalName("ERR_NoAuthority")] ErrNoAuthority = 9, +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/Config.cs.meta b/xiaofang/Assets/comm/Proto/Config.cs.meta new file mode 100644 index 00000000..40d31e9f --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Config.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6249125b6bd7a964aa825c041b9cab82 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/Fps.cs b/xiaofang/Assets/comm/Proto/Fps.cs new file mode 100644 index 00000000..8465fa89 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Fps.cs @@ -0,0 +1,1099 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: fps.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from fps.proto +public static partial class FpsReflection { + + #region Descriptor + /// File descriptor for fps.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FpsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CglmcHMucHJvdG8iNgoRQnJvYWRjYXN0RnJhbWVNc2cSIQoGZnJhbWVzGAEg", + "AygLMhEuRnJhbWVEYXRhUmVxdWVzdCJPChBGcmFtZURhdGFSZXF1ZXN0EhQK", + "B2ZyYW1lSUQYASABKA1IAIgBARIZCgVpbnB1dBgCIAMoCzIKLklucHV0RGF0", + "YUIKCghfZnJhbWVJRCJpCglJbnB1dERhdGESCgoCaWQYASABKAkSCwoDc0lk", + "GAIgASgJEgkKAXgYAyABKAISCQoBeRgEIAEoAhISCgpyb29tU2VhdElkGAUg", + "ASgFEgkKAXoYBiABKAISDgoGcm9vbUlkGAcgASgJIg8KDUVtcHR5UmVzcG9u", + "c2VCB1oFLi87cGJiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::BroadcastFrameMsg), global::BroadcastFrameMsg.Parser, new[]{ "Frames" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::FrameDataRequest), global::FrameDataRequest.Parser, new[]{ "FrameID", "Input" }, new[]{ "FrameID" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::InputData), global::InputData.Parser, new[]{ "Id", "SId", "X", "Y", "RoomSeatId", "Z", "RoomId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::EmptyResponse), global::EmptyResponse.Parser, null, null, null, null, null) + })); + } + #endregion + +} +#region Messages +/// +///骞挎挱甯ф秷鎭 +/// +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class BroadcastFrameMsg : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BroadcastFrameMsg()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::FpsReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BroadcastFrameMsg() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BroadcastFrameMsg(BroadcastFrameMsg other) : this() { + frames_ = other.frames_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BroadcastFrameMsg Clone() { + return new BroadcastFrameMsg(this); + } + + /// Field number for the "frames" field. + public const int FramesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_frames_codec + = pb::FieldCodec.ForMessage(10, global::FrameDataRequest.Parser); + private readonly pbc::RepeatedField frames_ = new pbc::RepeatedField(); + /// + ///甯ф暟鎹 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Frames { + get { return frames_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BroadcastFrameMsg); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BroadcastFrameMsg other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!frames_.Equals(other.frames_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= frames_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + frames_.WriteTo(output, _repeated_frames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + frames_.WriteTo(ref output, _repeated_frames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += frames_.CalculateSize(_repeated_frames_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BroadcastFrameMsg other) { + if (other == null) { + return; + } + frames_.Add(other.frames_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + frames_.AddEntriesFrom(input, _repeated_frames_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + frames_.AddEntriesFrom(ref input, _repeated_frames_codec); + break; + } + } + } + } + #endif + +} + +/// +///甯ф暟鎹 +/// +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class FrameDataRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FrameDataRequest()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::FpsReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FrameDataRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FrameDataRequest(FrameDataRequest other) : this() { + _hasBits0 = other._hasBits0; + frameID_ = other.frameID_; + input_ = other.input_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FrameDataRequest Clone() { + return new FrameDataRequest(this); + } + + /// Field number for the "frameID" field. + public const int FrameIDFieldNumber = 1; + private readonly static uint FrameIDDefaultValue = 0; + + private uint frameID_; + /// + ///甯D + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint FrameID { + get { if ((_hasBits0 & 1) != 0) { return frameID_; } else { return FrameIDDefaultValue; } } + set { + _hasBits0 |= 1; + frameID_ = value; + } + } + /// Gets whether the "frameID" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasFrameID { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "frameID" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearFrameID() { + _hasBits0 &= ~1; + } + + /// Field number for the "input" field. + public const int InputFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_input_codec + = pb::FieldCodec.ForMessage(18, global::InputData.Parser); + private readonly pbc::RepeatedField input_ = new pbc::RepeatedField(); + /// + ///鎿嶄綔杈撳叆 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Input { + get { return input_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FrameDataRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FrameDataRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FrameID != other.FrameID) return false; + if(!input_.Equals(other.input_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasFrameID) hash ^= FrameID.GetHashCode(); + hash ^= input_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasFrameID) { + output.WriteRawTag(8); + output.WriteUInt32(FrameID); + } + input_.WriteTo(output, _repeated_input_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasFrameID) { + output.WriteRawTag(8); + output.WriteUInt32(FrameID); + } + input_.WriteTo(ref output, _repeated_input_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasFrameID) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FrameID); + } + size += input_.CalculateSize(_repeated_input_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FrameDataRequest other) { + if (other == null) { + return; + } + if (other.HasFrameID) { + FrameID = other.FrameID; + } + input_.Add(other.input_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + FrameID = input.ReadUInt32(); + break; + } + case 18: { + input_.AddEntriesFrom(input, _repeated_input_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + FrameID = input.ReadUInt32(); + break; + } + case 18: { + input_.AddEntriesFrom(ref input, _repeated_input_codec); + break; + } + } + } + } + #endif + +} + +/// +///甯у瓨鍌ㄦ搷浣滆緭鍏 +/// +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class InputData : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InputData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::FpsReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InputData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InputData(InputData other) : this() { + id_ = other.id_; + sId_ = other.sId_; + x_ = other.x_; + y_ = other.y_; + roomSeatId_ = other.roomSeatId_; + z_ = other.z_; + roomId_ = other.roomId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InputData Clone() { + return new InputData(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private string id_ = ""; + /// + ///id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "sId" field. + public const int SIdFieldNumber = 2; + private string sId_ = ""; + /// + ///鎿嶄綔id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SId { + get { return sId_; } + set { + sId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "x" field. + public const int XFieldNumber = 3; + private float x_; + /// + ///鎿嶄綔浣嶇疆x + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float X { + get { return x_; } + set { + x_ = value; + } + } + + /// Field number for the "y" field. + public const int YFieldNumber = 4; + private float y_; + /// + ///鎿嶄綔浣嶇疆y + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Y { + get { return y_; } + set { + y_ = value; + } + } + + /// Field number for the "roomSeatId" field. + public const int RoomSeatIdFieldNumber = 5; + private int roomSeatId_; + /// + ///鎿嶄綔鑰呯殑浣嶇疆绱㈠紩id(1~N) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RoomSeatId { + get { return roomSeatId_; } + set { + roomSeatId_ = value; + } + } + + /// Field number for the "z" field. + public const int ZFieldNumber = 6; + private float z_; + /// + ///鎿嶄綔浣嶇疆z + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Z { + get { return z_; } + set { + z_ = value; + } + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 7; + private string roomId_ = ""; + /// + ///鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InputData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InputData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (SId != other.SId) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false; + if (RoomSeatId != other.RoomSeatId) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Z, other.Z)) return false; + if (RoomId != other.RoomId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (SId.Length != 0) hash ^= SId.GetHashCode(); + if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X); + if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y); + if (RoomSeatId != 0) hash ^= RoomSeatId.GetHashCode(); + if (Z != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Z); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (SId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(SId); + } + if (X != 0F) { + output.WriteRawTag(29); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Y); + } + if (RoomSeatId != 0) { + output.WriteRawTag(40); + output.WriteInt32(RoomSeatId); + } + if (Z != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Z); + } + if (RoomId.Length != 0) { + output.WriteRawTag(58); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (SId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(SId); + } + if (X != 0F) { + output.WriteRawTag(29); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Y); + } + if (RoomSeatId != 0) { + output.WriteRawTag(40); + output.WriteInt32(RoomSeatId); + } + if (Z != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Z); + } + if (RoomId.Length != 0) { + output.WriteRawTag(58); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } + if (SId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SId); + } + if (X != 0F) { + size += 1 + 4; + } + if (Y != 0F) { + size += 1 + 4; + } + if (RoomSeatId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RoomSeatId); + } + if (Z != 0F) { + size += 1 + 4; + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InputData other) { + if (other == null) { + return; + } + if (other.Id.Length != 0) { + Id = other.Id; + } + if (other.SId.Length != 0) { + SId = other.SId; + } + if (other.X != 0F) { + X = other.X; + } + if (other.Y != 0F) { + Y = other.Y; + } + if (other.RoomSeatId != 0) { + RoomSeatId = other.RoomSeatId; + } + if (other.Z != 0F) { + Z = other.Z; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Id = input.ReadString(); + break; + } + case 18: { + SId = input.ReadString(); + break; + } + case 29: { + X = input.ReadFloat(); + break; + } + case 37: { + Y = input.ReadFloat(); + break; + } + case 40: { + RoomSeatId = input.ReadInt32(); + break; + } + case 53: { + Z = input.ReadFloat(); + break; + } + case 58: { + RoomId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Id = input.ReadString(); + break; + } + case 18: { + SId = input.ReadString(); + break; + } + case 29: { + X = input.ReadFloat(); + break; + } + case 37: { + Y = input.ReadFloat(); + break; + } + case 40: { + RoomSeatId = input.ReadInt32(); + break; + } + case 53: { + Z = input.ReadFloat(); + break; + } + case 58: { + RoomId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +/// +/// 绌虹櫧娑堟伅 +/// +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class EmptyResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EmptyResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::FpsReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmptyResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmptyResponse(EmptyResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmptyResponse Clone() { + return new EmptyResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EmptyResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EmptyResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EmptyResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/Fps.cs.meta b/xiaofang/Assets/comm/Proto/Fps.cs.meta new file mode 100644 index 00000000..3c5e24a9 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Fps.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 013d659005f08544cafe01b5a18e6072 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/Hall.cs b/xiaofang/Assets/comm/Proto/Hall.cs new file mode 100644 index 00000000..ed173479 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Hall.cs @@ -0,0 +1,4803 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: hall.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from hall.proto +public static partial class HallReflection { + + #region Descriptor + /// File descriptor for hall.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static HallReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CgpoYWxsLnByb3RvIi8KDExvZ2luUmVxdWVzdBIOCgZ1c2VySWQYASABKAkS", + "DwoHYWNjb3VudBgCIAEoCSIuCg1Mb2dpblJlc3BvbnNlEg8KB21lc3NhZ2UY", + "ASABKAkSDAoEY29kZRgCIAEoBSIfCgxIZWxsb1JlcXVlc3QSDwoHbWVzc2Fn", + "ZRgBIAEoCSIgCg1IZWxsb1Jlc3BvbnNlEg8KB21lc3NhZ2UYASABKAkiIQoP", + "Sm9pblJvb21SZXF1ZXN0Eg4KBnJvb21JZBgBIAEoCSJUChBKb2luUm9vbVJl", + "c3BvbnNlEg8KB21lc3NhZ2UYASABKAkSDAoEY29kZRgCIAEoBRIhCgRkYXRh", + "GAMgASgLMhMuUGxheWVySm9pblJlc3BvbnNlIrcDChJQbGF5ZXJKb2luUmVz", + "cG9uc2USEAoIVXNlck5hbWUYASABKAkSDgoGUm9vbUlkGAIgASgJEg4KBlN0", + "YXR1cxgDIAEoBRIQCghSb2xlTmFtZRgEIAEoCRIUCgxJc0xlYWRpbmdOUEMY", + "BSABKAUSDgoGT25saW5lGAYgASgIEg4KBlJvbGVJZBgHIAEoBRITCgtHcm91", + "cExlYWRlchgIIAEoBRISCgpBY3Rpb25Nb2RlGAkgASgFEg0KBUdyb3VwGAog", + "ASgFEgkKAVgYCyABKAISCQoBWRgMIAEoAhIJCgFaGA0gASgCEhMKC092ZXJz", + "ZWVDb25kGA4gASgJEhYKDlNlbmRGcmFtZUNvdW50GA8gASgFEhYKDk1vdmVT", + "cGVlZEZpcnN0GBAgASgFEhcKD01vdmVTcGVlZFNlY29uZBgRIAEoBRIWCg5N", + "b3ZlU3BlZWRUaGlyZBgSIAEoBRIQCghCZWFyTG9hZBgTIAEoBRISCgpQcm90", + "ZWN0aW9uGBQgASgFEg4KBkhlYWx0aBgVIAEoBRISCgpSb2xlU3RhdHVzGBYg", + "ASgFEg4KBlVzZXJJZBgXIAEoAyIpChNQcm9wVGVtcGxhdGVSZXF1ZXN0EhIK", + "CnRlbXBsYXRlSWQYASABKAMiSwoUUHJvcFRlbXBsYXRlUmVzcG9uc2USEgoK", + "VGVtcGxhdGVJZBgBIAEoAxILCgNOdW0YAiABKAMSEgoKTWF0ZXJpYWxJZBgD", + "IAEoAyI7Cg9QcGNQcm9wUmVzcG9uc2USKAoJcmVzcG9uc2VzGAEgAygLMhUu", + "UHJvcFRlbXBsYXRlUmVzcG9uc2UiWgoTUnBjUm9vbUluZm9SZXNwb25zZRIK", + "CgJJZBgBIAEoAxISCgpUZW1wbGF0ZUlkGAIgASgDEg4KBlN0YXR1cxgDIAEo", + "AxITCgtSZXNlcnZlRGF0ZRgEIAEoAyI5ChNVc2VyVGVtcGxhdGVSZXF1ZXN0", + "EhIKCnRlbXBsYXRlSWQYASABKAMSDgoGUm9vbUlkGAIgASgJIjgKDFVzZXJU", + "ZW1wbGF0ZRIoCglyZXNwb25zZXMYASADKAsyFS5Vc2VyVGVtcGxhdGVSZXNw", + "b25zZSKVAQoUVXNlclRlbXBsYXRlUmVzcG9uc2USDgoGUm9vbUlkGAEgASgD", + "Eg4KBlVzZXJJZBgCIAEoAxIOCgZTdGF0dXMYAyABKAUSEgoKVGVtcGxhdGVJ", + "ZBgEIAEoAxIOCgZSb2xlSWQYBSABKAMSEwoLQmlydGhBcmVhSWQYBiABKAMS", + "FAoMQ2hhcmdlQXJlYUlkGAcgASgDImIKD1VzZXJJbmZvUmVxdWVzdBIOCgZV", + "c2VySWQYASABKAMSDgoGU3RhdHVzGAIgASgFEg4KBlJvb21JZBgDIAEoCRIJ", + "CgF4GAQgASgCEgkKAXkYBSABKAISCQoBehgGIAEoAiISChBVc2VySW5mb1Jl", + "c3BvbnNlQgdaBS4vO3BiYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::LoginRequest), global::LoginRequest.Parser, new[]{ "UserId", "Account" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::LoginResponse), global::LoginResponse.Parser, new[]{ "Message", "Code" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::HelloRequest), global::HelloRequest.Parser, new[]{ "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::HelloResponse), global::HelloResponse.Parser, new[]{ "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::JoinRoomRequest), global::JoinRoomRequest.Parser, new[]{ "RoomId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::JoinRoomResponse), global::JoinRoomResponse.Parser, new[]{ "Message", "Code", "Data" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::PlayerJoinResponse), global::PlayerJoinResponse.Parser, new[]{ "UserName", "RoomId", "Status", "RoleName", "IsLeadingNPC", "Online", "RoleId", "GroupLeader", "ActionMode", "Group", "X", "Y", "Z", "OverseeCond", "SendFrameCount", "MoveSpeedFirst", "MoveSpeedSecond", "MoveSpeedThird", "BearLoad", "Protection", "Health", "RoleStatus", "UserId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::PropTemplateRequest), global::PropTemplateRequest.Parser, new[]{ "TemplateId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::PropTemplateResponse), global::PropTemplateResponse.Parser, new[]{ "TemplateId", "Num", "MaterialId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::PpcPropResponse), global::PpcPropResponse.Parser, new[]{ "Responses" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::RpcRoomInfoResponse), global::RpcRoomInfoResponse.Parser, new[]{ "Id", "TemplateId", "Status", "ReserveDate" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::UserTemplateRequest), global::UserTemplateRequest.Parser, new[]{ "TemplateId", "RoomId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::UserTemplate), global::UserTemplate.Parser, new[]{ "Responses" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::UserTemplateResponse), global::UserTemplateResponse.Parser, new[]{ "RoomId", "UserId", "Status", "TemplateId", "RoleId", "BirthAreaId", "ChargeAreaId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::UserInfoRequest), global::UserInfoRequest.Parser, new[]{ "UserId", "Status", "RoomId", "X", "Y", "Z" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::UserInfoResponse), global::UserInfoResponse.Parser, null, null, null, null, null) + })); + } + #endregion + +} +#region Messages +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class LoginRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginRequest(LoginRequest other) : this() { + userId_ = other.userId_; + account_ = other.account_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginRequest Clone() { + return new LoginRequest(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private string userId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserId { + get { return userId_; } + set { + userId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "account" field. + public const int AccountFieldNumber = 2; + private string account_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Account { + get { return account_; } + set { + account_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LoginRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LoginRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (Account != other.Account) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId.Length != 0) hash ^= UserId.GetHashCode(); + if (Account.Length != 0) hash ^= Account.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UserId); + } + if (Account.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Account); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UserId); + } + if (Account.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Account); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserId); + } + if (Account.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Account); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LoginRequest other) { + if (other == null) { + return; + } + if (other.UserId.Length != 0) { + UserId = other.UserId; + } + if (other.Account.Length != 0) { + Account = other.Account; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + UserId = input.ReadString(); + break; + } + case 18: { + Account = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + UserId = input.ReadString(); + break; + } + case 18: { + Account = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class LoginResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginResponse(LoginResponse other) : this() { + message_ = other.message_; + code_ = other.code_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginResponse Clone() { + return new LoginResponse(this); + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 1; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 2; + private int code_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Code { + get { return code_; } + set { + code_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LoginResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LoginResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Message != other.Message) return false; + if (Code != other.Code) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (Code != 0) hash ^= Code.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Message.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Message); + } + if (Code != 0) { + output.WriteRawTag(16); + output.WriteInt32(Code); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Message.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Message); + } + if (Code != 0) { + output.WriteRawTag(16); + output.WriteInt32(Code); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (Code != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LoginResponse other) { + if (other == null) { + return; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.Code != 0) { + Code = other.Code; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Message = input.ReadString(); + break; + } + case 16: { + Code = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Message = input.ReadString(); + break; + } + case 16: { + Code = input.ReadInt32(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class HelloRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new HelloRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public HelloRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public HelloRequest(HelloRequest other) : this() { + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public HelloRequest Clone() { + return new HelloRequest(this); + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 1; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as HelloRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(HelloRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Message.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Message.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(HelloRequest other) { + if (other == null) { + return; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class HelloResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new HelloResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public HelloResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public HelloResponse(HelloResponse other) : this() { + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public HelloResponse Clone() { + return new HelloResponse(this); + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 1; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as HelloResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(HelloResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Message.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Message.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(HelloResponse other) { + if (other == null) { + return; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class JoinRoomRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new JoinRoomRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JoinRoomRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JoinRoomRequest(JoinRoomRequest other) : this() { + roomId_ = other.roomId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JoinRoomRequest Clone() { + return new JoinRoomRequest(this); + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 1; + private string roomId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as JoinRoomRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(JoinRoomRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(JoinRoomRequest other) { + if (other == null) { + return; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class JoinRoomResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new JoinRoomResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JoinRoomResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JoinRoomResponse(JoinRoomResponse other) : this() { + message_ = other.message_; + code_ = other.code_; + data_ = other.data_ != null ? other.data_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public JoinRoomResponse Clone() { + return new JoinRoomResponse(this); + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 1; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 2; + private int code_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Code { + get { return code_; } + set { + code_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 3; + private global::PlayerJoinResponse data_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::PlayerJoinResponse Data { + get { return data_; } + set { + data_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as JoinRoomResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(JoinRoomResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Message != other.Message) return false; + if (Code != other.Code) return false; + if (!object.Equals(Data, other.Data)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (Code != 0) hash ^= Code.GetHashCode(); + if (data_ != null) hash ^= Data.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Message.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Message); + } + if (Code != 0) { + output.WriteRawTag(16); + output.WriteInt32(Code); + } + if (data_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Message.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Message); + } + if (Code != 0) { + output.WriteRawTag(16); + output.WriteInt32(Code); + } + if (data_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (Code != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); + } + if (data_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Data); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(JoinRoomResponse other) { + if (other == null) { + return; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.Code != 0) { + Code = other.Code; + } + if (other.data_ != null) { + if (data_ == null) { + Data = new global::PlayerJoinResponse(); + } + Data.MergeFrom(other.Data); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Message = input.ReadString(); + break; + } + case 16: { + Code = input.ReadInt32(); + break; + } + case 26: { + if (data_ == null) { + Data = new global::PlayerJoinResponse(); + } + input.ReadMessage(Data); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Message = input.ReadString(); + break; + } + case 16: { + Code = input.ReadInt32(); + break; + } + case 26: { + if (data_ == null) { + Data = new global::PlayerJoinResponse(); + } + input.ReadMessage(Data); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class PlayerJoinResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PlayerJoinResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlayerJoinResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlayerJoinResponse(PlayerJoinResponse other) : this() { + userName_ = other.userName_; + roomId_ = other.roomId_; + status_ = other.status_; + roleName_ = other.roleName_; + isLeadingNPC_ = other.isLeadingNPC_; + online_ = other.online_; + roleId_ = other.roleId_; + groupLeader_ = other.groupLeader_; + actionMode_ = other.actionMode_; + group_ = other.group_; + x_ = other.x_; + y_ = other.y_; + z_ = other.z_; + overseeCond_ = other.overseeCond_; + sendFrameCount_ = other.sendFrameCount_; + moveSpeedFirst_ = other.moveSpeedFirst_; + moveSpeedSecond_ = other.moveSpeedSecond_; + moveSpeedThird_ = other.moveSpeedThird_; + bearLoad_ = other.bearLoad_; + protection_ = other.protection_; + health_ = other.health_; + roleStatus_ = other.roleStatus_; + userId_ = other.userId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PlayerJoinResponse Clone() { + return new PlayerJoinResponse(this); + } + + /// Field number for the "UserName" field. + public const int UserNameFieldNumber = 1; + private string userName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserName { + get { return userName_; } + set { + userName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "RoomId" field. + public const int RoomIdFieldNumber = 2; + private string roomId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Status" field. + public const int StatusFieldNumber = 3; + private int status_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "RoleName" field. + public const int RoleNameFieldNumber = 4; + private string roleName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoleName { + get { return roleName_; } + set { + roleName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "IsLeadingNPC" field. + public const int IsLeadingNPCFieldNumber = 5; + private int isLeadingNPC_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int IsLeadingNPC { + get { return isLeadingNPC_; } + set { + isLeadingNPC_ = value; + } + } + + /// Field number for the "Online" field. + public const int OnlineFieldNumber = 6; + private bool online_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Online { + get { return online_; } + set { + online_ = value; + } + } + + /// Field number for the "RoleId" field. + public const int RoleIdFieldNumber = 7; + private int roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "GroupLeader" field. + public const int GroupLeaderFieldNumber = 8; + private int groupLeader_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int GroupLeader { + get { return groupLeader_; } + set { + groupLeader_ = value; + } + } + + /// Field number for the "ActionMode" field. + public const int ActionModeFieldNumber = 9; + private int actionMode_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ActionMode { + get { return actionMode_; } + set { + actionMode_ = value; + } + } + + /// Field number for the "Group" field. + public const int GroupFieldNumber = 10; + private int group_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Group { + get { return group_; } + set { + group_ = value; + } + } + + /// Field number for the "X" field. + public const int XFieldNumber = 11; + private float x_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float X { + get { return x_; } + set { + x_ = value; + } + } + + /// Field number for the "Y" field. + public const int YFieldNumber = 12; + private float y_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Y { + get { return y_; } + set { + y_ = value; + } + } + + /// Field number for the "Z" field. + public const int ZFieldNumber = 13; + private float z_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Z { + get { return z_; } + set { + z_ = value; + } + } + + /// Field number for the "OverseeCond" field. + public const int OverseeCondFieldNumber = 14; + private string overseeCond_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OverseeCond { + get { return overseeCond_; } + set { + overseeCond_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "SendFrameCount" field. + public const int SendFrameCountFieldNumber = 15; + private int sendFrameCount_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SendFrameCount { + get { return sendFrameCount_; } + set { + sendFrameCount_ = value; + } + } + + /// Field number for the "MoveSpeedFirst" field. + public const int MoveSpeedFirstFieldNumber = 16; + private int moveSpeedFirst_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MoveSpeedFirst { + get { return moveSpeedFirst_; } + set { + moveSpeedFirst_ = value; + } + } + + /// Field number for the "MoveSpeedSecond" field. + public const int MoveSpeedSecondFieldNumber = 17; + private int moveSpeedSecond_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MoveSpeedSecond { + get { return moveSpeedSecond_; } + set { + moveSpeedSecond_ = value; + } + } + + /// Field number for the "MoveSpeedThird" field. + public const int MoveSpeedThirdFieldNumber = 18; + private int moveSpeedThird_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MoveSpeedThird { + get { return moveSpeedThird_; } + set { + moveSpeedThird_ = value; + } + } + + /// Field number for the "BearLoad" field. + public const int BearLoadFieldNumber = 19; + private int bearLoad_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int BearLoad { + get { return bearLoad_; } + set { + bearLoad_ = value; + } + } + + /// Field number for the "Protection" field. + public const int ProtectionFieldNumber = 20; + private int protection_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Protection { + get { return protection_; } + set { + protection_ = value; + } + } + + /// Field number for the "Health" field. + public const int HealthFieldNumber = 21; + private int health_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Health { + get { return health_; } + set { + health_ = value; + } + } + + /// Field number for the "RoleStatus" field. + public const int RoleStatusFieldNumber = 22; + private int roleStatus_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RoleStatus { + get { return roleStatus_; } + set { + roleStatus_ = value; + } + } + + /// Field number for the "UserId" field. + public const int UserIdFieldNumber = 23; + private long userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PlayerJoinResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PlayerJoinResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserName != other.UserName) return false; + if (RoomId != other.RoomId) return false; + if (Status != other.Status) return false; + if (RoleName != other.RoleName) return false; + if (IsLeadingNPC != other.IsLeadingNPC) return false; + if (Online != other.Online) return false; + if (RoleId != other.RoleId) return false; + if (GroupLeader != other.GroupLeader) return false; + if (ActionMode != other.ActionMode) return false; + if (Group != other.Group) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Z, other.Z)) return false; + if (OverseeCond != other.OverseeCond) return false; + if (SendFrameCount != other.SendFrameCount) return false; + if (MoveSpeedFirst != other.MoveSpeedFirst) return false; + if (MoveSpeedSecond != other.MoveSpeedSecond) return false; + if (MoveSpeedThird != other.MoveSpeedThird) return false; + if (BearLoad != other.BearLoad) return false; + if (Protection != other.Protection) return false; + if (Health != other.Health) return false; + if (RoleStatus != other.RoleStatus) return false; + if (UserId != other.UserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserName.Length != 0) hash ^= UserName.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (Status != 0) hash ^= Status.GetHashCode(); + if (RoleName.Length != 0) hash ^= RoleName.GetHashCode(); + if (IsLeadingNPC != 0) hash ^= IsLeadingNPC.GetHashCode(); + if (Online != false) hash ^= Online.GetHashCode(); + if (RoleId != 0) hash ^= RoleId.GetHashCode(); + if (GroupLeader != 0) hash ^= GroupLeader.GetHashCode(); + if (ActionMode != 0) hash ^= ActionMode.GetHashCode(); + if (Group != 0) hash ^= Group.GetHashCode(); + if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X); + if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y); + if (Z != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Z); + if (OverseeCond.Length != 0) hash ^= OverseeCond.GetHashCode(); + if (SendFrameCount != 0) hash ^= SendFrameCount.GetHashCode(); + if (MoveSpeedFirst != 0) hash ^= MoveSpeedFirst.GetHashCode(); + if (MoveSpeedSecond != 0) hash ^= MoveSpeedSecond.GetHashCode(); + if (MoveSpeedThird != 0) hash ^= MoveSpeedThird.GetHashCode(); + if (BearLoad != 0) hash ^= BearLoad.GetHashCode(); + if (Protection != 0) hash ^= Protection.GetHashCode(); + if (Health != 0) hash ^= Health.GetHashCode(); + if (RoleStatus != 0) hash ^= RoleStatus.GetHashCode(); + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UserName); + } + if (RoomId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RoomId); + } + if (Status != 0) { + output.WriteRawTag(24); + output.WriteInt32(Status); + } + if (RoleName.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RoleName); + } + if (IsLeadingNPC != 0) { + output.WriteRawTag(40); + output.WriteInt32(IsLeadingNPC); + } + if (Online != false) { + output.WriteRawTag(48); + output.WriteBool(Online); + } + if (RoleId != 0) { + output.WriteRawTag(56); + output.WriteInt32(RoleId); + } + if (GroupLeader != 0) { + output.WriteRawTag(64); + output.WriteInt32(GroupLeader); + } + if (ActionMode != 0) { + output.WriteRawTag(72); + output.WriteInt32(ActionMode); + } + if (Group != 0) { + output.WriteRawTag(80); + output.WriteInt32(Group); + } + if (X != 0F) { + output.WriteRawTag(93); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(101); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(109); + output.WriteFloat(Z); + } + if (OverseeCond.Length != 0) { + output.WriteRawTag(114); + output.WriteString(OverseeCond); + } + if (SendFrameCount != 0) { + output.WriteRawTag(120); + output.WriteInt32(SendFrameCount); + } + if (MoveSpeedFirst != 0) { + output.WriteRawTag(128, 1); + output.WriteInt32(MoveSpeedFirst); + } + if (MoveSpeedSecond != 0) { + output.WriteRawTag(136, 1); + output.WriteInt32(MoveSpeedSecond); + } + if (MoveSpeedThird != 0) { + output.WriteRawTag(144, 1); + output.WriteInt32(MoveSpeedThird); + } + if (BearLoad != 0) { + output.WriteRawTag(152, 1); + output.WriteInt32(BearLoad); + } + if (Protection != 0) { + output.WriteRawTag(160, 1); + output.WriteInt32(Protection); + } + if (Health != 0) { + output.WriteRawTag(168, 1); + output.WriteInt32(Health); + } + if (RoleStatus != 0) { + output.WriteRawTag(176, 1); + output.WriteInt32(RoleStatus); + } + if (UserId != 0L) { + output.WriteRawTag(184, 1); + output.WriteInt64(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UserName); + } + if (RoomId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RoomId); + } + if (Status != 0) { + output.WriteRawTag(24); + output.WriteInt32(Status); + } + if (RoleName.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RoleName); + } + if (IsLeadingNPC != 0) { + output.WriteRawTag(40); + output.WriteInt32(IsLeadingNPC); + } + if (Online != false) { + output.WriteRawTag(48); + output.WriteBool(Online); + } + if (RoleId != 0) { + output.WriteRawTag(56); + output.WriteInt32(RoleId); + } + if (GroupLeader != 0) { + output.WriteRawTag(64); + output.WriteInt32(GroupLeader); + } + if (ActionMode != 0) { + output.WriteRawTag(72); + output.WriteInt32(ActionMode); + } + if (Group != 0) { + output.WriteRawTag(80); + output.WriteInt32(Group); + } + if (X != 0F) { + output.WriteRawTag(93); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(101); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(109); + output.WriteFloat(Z); + } + if (OverseeCond.Length != 0) { + output.WriteRawTag(114); + output.WriteString(OverseeCond); + } + if (SendFrameCount != 0) { + output.WriteRawTag(120); + output.WriteInt32(SendFrameCount); + } + if (MoveSpeedFirst != 0) { + output.WriteRawTag(128, 1); + output.WriteInt32(MoveSpeedFirst); + } + if (MoveSpeedSecond != 0) { + output.WriteRawTag(136, 1); + output.WriteInt32(MoveSpeedSecond); + } + if (MoveSpeedThird != 0) { + output.WriteRawTag(144, 1); + output.WriteInt32(MoveSpeedThird); + } + if (BearLoad != 0) { + output.WriteRawTag(152, 1); + output.WriteInt32(BearLoad); + } + if (Protection != 0) { + output.WriteRawTag(160, 1); + output.WriteInt32(Protection); + } + if (Health != 0) { + output.WriteRawTag(168, 1); + output.WriteInt32(Health); + } + if (RoleStatus != 0) { + output.WriteRawTag(176, 1); + output.WriteInt32(RoleStatus); + } + if (UserId != 0L) { + output.WriteRawTag(184, 1); + output.WriteInt64(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserName); + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (Status != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status); + } + if (RoleName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoleName); + } + if (IsLeadingNPC != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(IsLeadingNPC); + } + if (Online != false) { + size += 1 + 1; + } + if (RoleId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RoleId); + } + if (GroupLeader != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(GroupLeader); + } + if (ActionMode != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ActionMode); + } + if (Group != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Group); + } + if (X != 0F) { + size += 1 + 4; + } + if (Y != 0F) { + size += 1 + 4; + } + if (Z != 0F) { + size += 1 + 4; + } + if (OverseeCond.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OverseeCond); + } + if (SendFrameCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SendFrameCount); + } + if (MoveSpeedFirst != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(MoveSpeedFirst); + } + if (MoveSpeedSecond != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(MoveSpeedSecond); + } + if (MoveSpeedThird != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(MoveSpeedThird); + } + if (BearLoad != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(BearLoad); + } + if (Protection != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(Protection); + } + if (Health != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(Health); + } + if (RoleStatus != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(RoleStatus); + } + if (UserId != 0L) { + size += 2 + pb::CodedOutputStream.ComputeInt64Size(UserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PlayerJoinResponse other) { + if (other == null) { + return; + } + if (other.UserName.Length != 0) { + UserName = other.UserName; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.Status != 0) { + Status = other.Status; + } + if (other.RoleName.Length != 0) { + RoleName = other.RoleName; + } + if (other.IsLeadingNPC != 0) { + IsLeadingNPC = other.IsLeadingNPC; + } + if (other.Online != false) { + Online = other.Online; + } + if (other.RoleId != 0) { + RoleId = other.RoleId; + } + if (other.GroupLeader != 0) { + GroupLeader = other.GroupLeader; + } + if (other.ActionMode != 0) { + ActionMode = other.ActionMode; + } + if (other.Group != 0) { + Group = other.Group; + } + if (other.X != 0F) { + X = other.X; + } + if (other.Y != 0F) { + Y = other.Y; + } + if (other.Z != 0F) { + Z = other.Z; + } + if (other.OverseeCond.Length != 0) { + OverseeCond = other.OverseeCond; + } + if (other.SendFrameCount != 0) { + SendFrameCount = other.SendFrameCount; + } + if (other.MoveSpeedFirst != 0) { + MoveSpeedFirst = other.MoveSpeedFirst; + } + if (other.MoveSpeedSecond != 0) { + MoveSpeedSecond = other.MoveSpeedSecond; + } + if (other.MoveSpeedThird != 0) { + MoveSpeedThird = other.MoveSpeedThird; + } + if (other.BearLoad != 0) { + BearLoad = other.BearLoad; + } + if (other.Protection != 0) { + Protection = other.Protection; + } + if (other.Health != 0) { + Health = other.Health; + } + if (other.RoleStatus != 0) { + RoleStatus = other.RoleStatus; + } + if (other.UserId != 0L) { + UserId = other.UserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + UserName = input.ReadString(); + break; + } + case 18: { + RoomId = input.ReadString(); + break; + } + case 24: { + Status = input.ReadInt32(); + break; + } + case 34: { + RoleName = input.ReadString(); + break; + } + case 40: { + IsLeadingNPC = input.ReadInt32(); + break; + } + case 48: { + Online = input.ReadBool(); + break; + } + case 56: { + RoleId = input.ReadInt32(); + break; + } + case 64: { + GroupLeader = input.ReadInt32(); + break; + } + case 72: { + ActionMode = input.ReadInt32(); + break; + } + case 80: { + Group = input.ReadInt32(); + break; + } + case 93: { + X = input.ReadFloat(); + break; + } + case 101: { + Y = input.ReadFloat(); + break; + } + case 109: { + Z = input.ReadFloat(); + break; + } + case 114: { + OverseeCond = input.ReadString(); + break; + } + case 120: { + SendFrameCount = input.ReadInt32(); + break; + } + case 128: { + MoveSpeedFirst = input.ReadInt32(); + break; + } + case 136: { + MoveSpeedSecond = input.ReadInt32(); + break; + } + case 144: { + MoveSpeedThird = input.ReadInt32(); + break; + } + case 152: { + BearLoad = input.ReadInt32(); + break; + } + case 160: { + Protection = input.ReadInt32(); + break; + } + case 168: { + Health = input.ReadInt32(); + break; + } + case 176: { + RoleStatus = input.ReadInt32(); + break; + } + case 184: { + UserId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + UserName = input.ReadString(); + break; + } + case 18: { + RoomId = input.ReadString(); + break; + } + case 24: { + Status = input.ReadInt32(); + break; + } + case 34: { + RoleName = input.ReadString(); + break; + } + case 40: { + IsLeadingNPC = input.ReadInt32(); + break; + } + case 48: { + Online = input.ReadBool(); + break; + } + case 56: { + RoleId = input.ReadInt32(); + break; + } + case 64: { + GroupLeader = input.ReadInt32(); + break; + } + case 72: { + ActionMode = input.ReadInt32(); + break; + } + case 80: { + Group = input.ReadInt32(); + break; + } + case 93: { + X = input.ReadFloat(); + break; + } + case 101: { + Y = input.ReadFloat(); + break; + } + case 109: { + Z = input.ReadFloat(); + break; + } + case 114: { + OverseeCond = input.ReadString(); + break; + } + case 120: { + SendFrameCount = input.ReadInt32(); + break; + } + case 128: { + MoveSpeedFirst = input.ReadInt32(); + break; + } + case 136: { + MoveSpeedSecond = input.ReadInt32(); + break; + } + case 144: { + MoveSpeedThird = input.ReadInt32(); + break; + } + case 152: { + BearLoad = input.ReadInt32(); + break; + } + case 160: { + Protection = input.ReadInt32(); + break; + } + case 168: { + Health = input.ReadInt32(); + break; + } + case 176: { + RoleStatus = input.ReadInt32(); + break; + } + case 184: { + UserId = input.ReadInt64(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class PropTemplateRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PropTemplateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropTemplateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropTemplateRequest(PropTemplateRequest other) : this() { + templateId_ = other.templateId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropTemplateRequest Clone() { + return new PropTemplateRequest(this); + } + + /// Field number for the "templateId" field. + public const int TemplateIdFieldNumber = 1; + private long templateId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TemplateId { + get { return templateId_; } + set { + templateId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PropTemplateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PropTemplateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TemplateId != other.TemplateId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TemplateId != 0L) hash ^= TemplateId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TemplateId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(TemplateId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TemplateId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(TemplateId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TemplateId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TemplateId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PropTemplateRequest other) { + if (other == null) { + return; + } + if (other.TemplateId != 0L) { + TemplateId = other.TemplateId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + TemplateId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + TemplateId = input.ReadInt64(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class PropTemplateResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PropTemplateResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropTemplateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropTemplateResponse(PropTemplateResponse other) : this() { + templateId_ = other.templateId_; + num_ = other.num_; + materialId_ = other.materialId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropTemplateResponse Clone() { + return new PropTemplateResponse(this); + } + + /// Field number for the "TemplateId" field. + public const int TemplateIdFieldNumber = 1; + private long templateId_; + /// + /// 閬撳叿妯℃澘id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TemplateId { + get { return templateId_; } + set { + templateId_ = value; + } + } + + /// Field number for the "Num" field. + public const int NumFieldNumber = 2; + private long num_; + /// + /// 閬撳叿鏁伴噺 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Num { + get { return num_; } + set { + num_ = value; + } + } + + /// Field number for the "MaterialId" field. + public const int MaterialIdFieldNumber = 3; + private long materialId_; + /// + /// 鏉愭枡id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long MaterialId { + get { return materialId_; } + set { + materialId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PropTemplateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PropTemplateResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TemplateId != other.TemplateId) return false; + if (Num != other.Num) return false; + if (MaterialId != other.MaterialId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TemplateId != 0L) hash ^= TemplateId.GetHashCode(); + if (Num != 0L) hash ^= Num.GetHashCode(); + if (MaterialId != 0L) hash ^= MaterialId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TemplateId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(TemplateId); + } + if (Num != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Num); + } + if (MaterialId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(MaterialId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TemplateId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(TemplateId); + } + if (Num != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Num); + } + if (MaterialId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(MaterialId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TemplateId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TemplateId); + } + if (Num != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Num); + } + if (MaterialId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaterialId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PropTemplateResponse other) { + if (other == null) { + return; + } + if (other.TemplateId != 0L) { + TemplateId = other.TemplateId; + } + if (other.Num != 0L) { + Num = other.Num; + } + if (other.MaterialId != 0L) { + MaterialId = other.MaterialId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + TemplateId = input.ReadInt64(); + break; + } + case 16: { + Num = input.ReadInt64(); + break; + } + case 24: { + MaterialId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + TemplateId = input.ReadInt64(); + break; + } + case 16: { + Num = input.ReadInt64(); + break; + } + case 24: { + MaterialId = input.ReadInt64(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class PpcPropResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PpcPropResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PpcPropResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PpcPropResponse(PpcPropResponse other) : this() { + responses_ = other.responses_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PpcPropResponse Clone() { + return new PpcPropResponse(this); + } + + /// Field number for the "responses" field. + public const int ResponsesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_responses_codec + = pb::FieldCodec.ForMessage(10, global::PropTemplateResponse.Parser); + private readonly pbc::RepeatedField responses_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Responses { + get { return responses_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PpcPropResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PpcPropResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!responses_.Equals(other.responses_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= responses_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + responses_.WriteTo(output, _repeated_responses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + responses_.WriteTo(ref output, _repeated_responses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += responses_.CalculateSize(_repeated_responses_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PpcPropResponse other) { + if (other == null) { + return; + } + responses_.Add(other.responses_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + responses_.AddEntriesFrom(input, _repeated_responses_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + responses_.AddEntriesFrom(ref input, _repeated_responses_codec); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class RpcRoomInfoResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RpcRoomInfoResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RpcRoomInfoResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RpcRoomInfoResponse(RpcRoomInfoResponse other) : this() { + id_ = other.id_; + templateId_ = other.templateId_; + status_ = other.status_; + reserveDate_ = other.reserveDate_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RpcRoomInfoResponse Clone() { + return new RpcRoomInfoResponse(this); + } + + /// Field number for the "Id" field. + public const int IdFieldNumber = 1; + private long id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "TemplateId" field. + public const int TemplateIdFieldNumber = 2; + private long templateId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TemplateId { + get { return templateId_; } + set { + templateId_ = value; + } + } + + /// Field number for the "Status" field. + public const int StatusFieldNumber = 3; + private long status_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "ReserveDate" field. + public const int ReserveDateFieldNumber = 4; + private long reserveDate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ReserveDate { + get { return reserveDate_; } + set { + reserveDate_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RpcRoomInfoResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RpcRoomInfoResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (TemplateId != other.TemplateId) return false; + if (Status != other.Status) return false; + if (ReserveDate != other.ReserveDate) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0L) hash ^= Id.GetHashCode(); + if (TemplateId != 0L) hash ^= TemplateId.GetHashCode(); + if (Status != 0L) hash ^= Status.GetHashCode(); + if (ReserveDate != 0L) hash ^= ReserveDate.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (TemplateId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(TemplateId); + } + if (Status != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Status); + } + if (ReserveDate != 0L) { + output.WriteRawTag(32); + output.WriteInt64(ReserveDate); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (TemplateId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(TemplateId); + } + if (Status != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Status); + } + if (ReserveDate != 0L) { + output.WriteRawTag(32); + output.WriteInt64(ReserveDate); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id); + } + if (TemplateId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TemplateId); + } + if (Status != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Status); + } + if (ReserveDate != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ReserveDate); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RpcRoomInfoResponse other) { + if (other == null) { + return; + } + if (other.Id != 0L) { + Id = other.Id; + } + if (other.TemplateId != 0L) { + TemplateId = other.TemplateId; + } + if (other.Status != 0L) { + Status = other.Status; + } + if (other.ReserveDate != 0L) { + ReserveDate = other.ReserveDate; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 16: { + TemplateId = input.ReadInt64(); + break; + } + case 24: { + Status = input.ReadInt64(); + break; + } + case 32: { + ReserveDate = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 16: { + TemplateId = input.ReadInt64(); + break; + } + case 24: { + Status = input.ReadInt64(); + break; + } + case 32: { + ReserveDate = input.ReadInt64(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserTemplateRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserTemplateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplateRequest(UserTemplateRequest other) : this() { + templateId_ = other.templateId_; + roomId_ = other.roomId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplateRequest Clone() { + return new UserTemplateRequest(this); + } + + /// Field number for the "templateId" field. + public const int TemplateIdFieldNumber = 1; + private long templateId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TemplateId { + get { return templateId_; } + set { + templateId_ = value; + } + } + + /// Field number for the "RoomId" field. + public const int RoomIdFieldNumber = 2; + private string roomId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserTemplateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserTemplateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TemplateId != other.TemplateId) return false; + if (RoomId != other.RoomId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TemplateId != 0L) hash ^= TemplateId.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TemplateId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(TemplateId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TemplateId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(TemplateId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TemplateId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TemplateId); + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserTemplateRequest other) { + if (other == null) { + return; + } + if (other.TemplateId != 0L) { + TemplateId = other.TemplateId; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + TemplateId = input.ReadInt64(); + break; + } + case 18: { + RoomId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + TemplateId = input.ReadInt64(); + break; + } + case 18: { + RoomId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserTemplate : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserTemplate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplate(UserTemplate other) : this() { + responses_ = other.responses_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplate Clone() { + return new UserTemplate(this); + } + + /// Field number for the "responses" field. + public const int ResponsesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_responses_codec + = pb::FieldCodec.ForMessage(10, global::UserTemplateResponse.Parser); + private readonly pbc::RepeatedField responses_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Responses { + get { return responses_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserTemplate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserTemplate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!responses_.Equals(other.responses_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= responses_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + responses_.WriteTo(output, _repeated_responses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + responses_.WriteTo(ref output, _repeated_responses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += responses_.CalculateSize(_repeated_responses_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserTemplate other) { + if (other == null) { + return; + } + responses_.Add(other.responses_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + responses_.AddEntriesFrom(input, _repeated_responses_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + responses_.AddEntriesFrom(ref input, _repeated_responses_codec); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserTemplateResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserTemplateResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplateResponse(UserTemplateResponse other) : this() { + roomId_ = other.roomId_; + userId_ = other.userId_; + status_ = other.status_; + templateId_ = other.templateId_; + roleId_ = other.roleId_; + birthAreaId_ = other.birthAreaId_; + chargeAreaId_ = other.chargeAreaId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTemplateResponse Clone() { + return new UserTemplateResponse(this); + } + + /// Field number for the "RoomId" field. + public const int RoomIdFieldNumber = 1; + private long roomId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoomId { + get { return roomId_; } + set { + roomId_ = value; + } + } + + /// Field number for the "UserId" field. + public const int UserIdFieldNumber = 2; + private long userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "Status" field. + public const int StatusFieldNumber = 3; + private int status_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "TemplateId" field. + public const int TemplateIdFieldNumber = 4; + private long templateId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TemplateId { + get { return templateId_; } + set { + templateId_ = value; + } + } + + /// Field number for the "RoleId" field. + public const int RoleIdFieldNumber = 5; + private long roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "BirthAreaId" field. + public const int BirthAreaIdFieldNumber = 6; + private long birthAreaId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long BirthAreaId { + get { return birthAreaId_; } + set { + birthAreaId_ = value; + } + } + + /// Field number for the "ChargeAreaId" field. + public const int ChargeAreaIdFieldNumber = 7; + private long chargeAreaId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ChargeAreaId { + get { return chargeAreaId_; } + set { + chargeAreaId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserTemplateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserTemplateResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + if (UserId != other.UserId) return false; + if (Status != other.Status) return false; + if (TemplateId != other.TemplateId) return false; + if (RoleId != other.RoleId) return false; + if (BirthAreaId != other.BirthAreaId) return false; + if (ChargeAreaId != other.ChargeAreaId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId != 0L) hash ^= RoomId.GetHashCode(); + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (Status != 0) hash ^= Status.GetHashCode(); + if (TemplateId != 0L) hash ^= TemplateId.GetHashCode(); + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (BirthAreaId != 0L) hash ^= BirthAreaId.GetHashCode(); + if (ChargeAreaId != 0L) hash ^= ChargeAreaId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoomId); + } + if (UserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(UserId); + } + if (Status != 0) { + output.WriteRawTag(24); + output.WriteInt32(Status); + } + if (TemplateId != 0L) { + output.WriteRawTag(32); + output.WriteInt64(TemplateId); + } + if (RoleId != 0L) { + output.WriteRawTag(40); + output.WriteInt64(RoleId); + } + if (BirthAreaId != 0L) { + output.WriteRawTag(48); + output.WriteInt64(BirthAreaId); + } + if (ChargeAreaId != 0L) { + output.WriteRawTag(56); + output.WriteInt64(ChargeAreaId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoomId); + } + if (UserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(UserId); + } + if (Status != 0) { + output.WriteRawTag(24); + output.WriteInt32(Status); + } + if (TemplateId != 0L) { + output.WriteRawTag(32); + output.WriteInt64(TemplateId); + } + if (RoleId != 0L) { + output.WriteRawTag(40); + output.WriteInt64(RoleId); + } + if (BirthAreaId != 0L) { + output.WriteRawTag(48); + output.WriteInt64(BirthAreaId); + } + if (ChargeAreaId != 0L) { + output.WriteRawTag(56); + output.WriteInt64(ChargeAreaId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoomId); + } + if (UserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); + } + if (Status != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status); + } + if (TemplateId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TemplateId); + } + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + } + if (BirthAreaId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BirthAreaId); + } + if (ChargeAreaId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ChargeAreaId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserTemplateResponse other) { + if (other == null) { + return; + } + if (other.RoomId != 0L) { + RoomId = other.RoomId; + } + if (other.UserId != 0L) { + UserId = other.UserId; + } + if (other.Status != 0) { + Status = other.Status; + } + if (other.TemplateId != 0L) { + TemplateId = other.TemplateId; + } + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } + if (other.BirthAreaId != 0L) { + BirthAreaId = other.BirthAreaId; + } + if (other.ChargeAreaId != 0L) { + ChargeAreaId = other.ChargeAreaId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoomId = input.ReadInt64(); + break; + } + case 16: { + UserId = input.ReadInt64(); + break; + } + case 24: { + Status = input.ReadInt32(); + break; + } + case 32: { + TemplateId = input.ReadInt64(); + break; + } + case 40: { + RoleId = input.ReadInt64(); + break; + } + case 48: { + BirthAreaId = input.ReadInt64(); + break; + } + case 56: { + ChargeAreaId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoomId = input.ReadInt64(); + break; + } + case 16: { + UserId = input.ReadInt64(); + break; + } + case 24: { + Status = input.ReadInt32(); + break; + } + case 32: { + TemplateId = input.ReadInt64(); + break; + } + case 40: { + RoleId = input.ReadInt64(); + break; + } + case 48: { + BirthAreaId = input.ReadInt64(); + break; + } + case 56: { + ChargeAreaId = input.ReadInt64(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserInfoRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserInfoRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserInfoRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserInfoRequest(UserInfoRequest other) : this() { + userId_ = other.userId_; + status_ = other.status_; + roomId_ = other.roomId_; + x_ = other.x_; + y_ = other.y_; + z_ = other.z_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserInfoRequest Clone() { + return new UserInfoRequest(this); + } + + /// Field number for the "UserId" field. + public const int UserIdFieldNumber = 1; + private long userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "Status" field. + public const int StatusFieldNumber = 2; + private int status_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "RoomId" field. + public const int RoomIdFieldNumber = 3; + private string roomId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "x" field. + public const int XFieldNumber = 4; + private float x_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float X { + get { return x_; } + set { + x_ = value; + } + } + + /// Field number for the "y" field. + public const int YFieldNumber = 5; + private float y_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Y { + get { return y_; } + set { + y_ = value; + } + } + + /// Field number for the "z" field. + public const int ZFieldNumber = 6; + private float z_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Z { + get { return z_; } + set { + z_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserInfoRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserInfoRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (Status != other.Status) return false; + if (RoomId != other.RoomId) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Z, other.Z)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (Status != 0) hash ^= Status.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X); + if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y); + if (Z != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Z); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UserId); + } + if (Status != 0) { + output.WriteRawTag(16); + output.WriteInt32(Status); + } + if (RoomId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoomId); + } + if (X != 0F) { + output.WriteRawTag(37); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(45); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Z); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UserId); + } + if (Status != 0) { + output.WriteRawTag(16); + output.WriteInt32(Status); + } + if (RoomId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoomId); + } + if (X != 0F) { + output.WriteRawTag(37); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(45); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Z); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); + } + if (Status != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status); + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (X != 0F) { + size += 1 + 4; + } + if (Y != 0F) { + size += 1 + 4; + } + if (Z != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserInfoRequest other) { + if (other == null) { + return; + } + if (other.UserId != 0L) { + UserId = other.UserId; + } + if (other.Status != 0) { + Status = other.Status; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.X != 0F) { + X = other.X; + } + if (other.Y != 0F) { + Y = other.Y; + } + if (other.Z != 0F) { + Z = other.Z; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UserId = input.ReadInt64(); + break; + } + case 16: { + Status = input.ReadInt32(); + break; + } + case 26: { + RoomId = input.ReadString(); + break; + } + case 37: { + X = input.ReadFloat(); + break; + } + case 45: { + Y = input.ReadFloat(); + break; + } + case 53: { + Z = input.ReadFloat(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UserId = input.ReadInt64(); + break; + } + case 16: { + Status = input.ReadInt32(); + break; + } + case 26: { + RoomId = input.ReadString(); + break; + } + case 37: { + X = input.ReadFloat(); + break; + } + case 45: { + Y = input.ReadFloat(); + break; + } + case 53: { + Z = input.ReadFloat(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserInfoResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserInfoResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::HallReflection.Descriptor.MessageTypes[15]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserInfoResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserInfoResponse(UserInfoResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserInfoResponse Clone() { + return new UserInfoResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserInfoResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserInfoResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserInfoResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/Hall.cs.meta b/xiaofang/Assets/comm/Proto/Hall.cs.meta new file mode 100644 index 00000000..949acf0b --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Hall.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8fd26537609bdf14b8eb7d5150ef5262 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/Join.cs b/xiaofang/Assets/comm/Proto/Join.cs new file mode 100644 index 00000000..33bae7dc --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Join.cs @@ -0,0 +1,675 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: join.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from join.proto +public static partial class JoinReflection { + + #region Descriptor + /// File descriptor for join.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static JoinReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cgpqb2luLnByb3RvIogBChBVc2VySm9pblJlc3BvbnNlEg4KBnVzZXJJZBgB", + "IAEoAxIQCghuaWNrTmFtZRgCIAEoCRIQCghyb2xlTmFtZRgDIAEoCRIOCgZy", + "b29tSWQYBCABKAkSDgoGb25saW5lGAUgASgIEhMKC21lc3NhZ2VUeXBlGAYg", + "ASgFEgsKA2NtZBgHIAEoCSI3ChBSb29tVXNlclJlc3BvbnNlEiMKCHVzZXJM", + "aXN0GAEgAygLMhEuVXNlckpvaW5SZXNwb25zZUIHWgUuLztwYmIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::UserJoinResponse), global::UserJoinResponse.Parser, new[]{ "UserId", "NickName", "RoleName", "RoomId", "Online", "MessageType", "Cmd" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::RoomUserResponse), global::RoomUserResponse.Parser, new[]{ "UserList" }, null, null, null, null) + })); + } + #endregion + +} +#region Messages +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserJoinResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserJoinResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::JoinReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserJoinResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserJoinResponse(UserJoinResponse other) : this() { + userId_ = other.userId_; + nickName_ = other.nickName_; + roleName_ = other.roleName_; + roomId_ = other.roomId_; + online_ = other.online_; + messageType_ = other.messageType_; + cmd_ = other.cmd_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserJoinResponse Clone() { + return new UserJoinResponse(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private long userId_; + /// + /// 鐢ㄦ埛id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "nickName" field. + public const int NickNameFieldNumber = 2; + private string nickName_ = ""; + /// + /// 鐢ㄦ埛鍚 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NickName { + get { return nickName_; } + set { + nickName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "roleName" field. + public const int RoleNameFieldNumber = 3; + private string roleName_ = ""; + /// + /// 鐢ㄦ埛瑙掕壊 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoleName { + get { return roleName_; } + set { + roleName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 4; + private string roomId_ = ""; + /// + ///鎴块棿鍙 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "online" field. + public const int OnlineFieldNumber = 5; + private bool online_; + /// + ///鐘舵 鎺ユ敹杩欎釜鐢ㄦ埛鏄笉鏄帀绾夸簡 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Online { + get { return online_; } + set { + online_ = value; + } + } + + /// Field number for the "messageType" field. + public const int MessageTypeFieldNumber = 6; + private int messageType_; + /// + ///浜嬩欢鐘舵 1 鐢ㄦ埛涓婄嚎 2鐢ㄦ埛涓嬬嚎 3 鐢ㄦ埛鍔犲叆鎴块棿 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MessageType { + get { return messageType_; } + set { + messageType_ = value; + } + } + + /// Field number for the "cmd" field. + public const int CmdFieldNumber = 7; + private string cmd_ = ""; + /// + ///鎿嶄綔鎸囦护 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Cmd { + get { return cmd_; } + set { + cmd_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserJoinResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserJoinResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (NickName != other.NickName) return false; + if (RoleName != other.RoleName) return false; + if (RoomId != other.RoomId) return false; + if (Online != other.Online) return false; + if (MessageType != other.MessageType) return false; + if (Cmd != other.Cmd) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (NickName.Length != 0) hash ^= NickName.GetHashCode(); + if (RoleName.Length != 0) hash ^= RoleName.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (Online != false) hash ^= Online.GetHashCode(); + if (MessageType != 0) hash ^= MessageType.GetHashCode(); + if (Cmd.Length != 0) hash ^= Cmd.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UserId); + } + if (NickName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NickName); + } + if (RoleName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoleName); + } + if (RoomId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RoomId); + } + if (Online != false) { + output.WriteRawTag(40); + output.WriteBool(Online); + } + if (MessageType != 0) { + output.WriteRawTag(48); + output.WriteInt32(MessageType); + } + if (Cmd.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Cmd); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UserId); + } + if (NickName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NickName); + } + if (RoleName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoleName); + } + if (RoomId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RoomId); + } + if (Online != false) { + output.WriteRawTag(40); + output.WriteBool(Online); + } + if (MessageType != 0) { + output.WriteRawTag(48); + output.WriteInt32(MessageType); + } + if (Cmd.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Cmd); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); + } + if (NickName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NickName); + } + if (RoleName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoleName); + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (Online != false) { + size += 1 + 1; + } + if (MessageType != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MessageType); + } + if (Cmd.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Cmd); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserJoinResponse other) { + if (other == null) { + return; + } + if (other.UserId != 0L) { + UserId = other.UserId; + } + if (other.NickName.Length != 0) { + NickName = other.NickName; + } + if (other.RoleName.Length != 0) { + RoleName = other.RoleName; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.Online != false) { + Online = other.Online; + } + if (other.MessageType != 0) { + MessageType = other.MessageType; + } + if (other.Cmd.Length != 0) { + Cmd = other.Cmd; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UserId = input.ReadInt64(); + break; + } + case 18: { + NickName = input.ReadString(); + break; + } + case 26: { + RoleName = input.ReadString(); + break; + } + case 34: { + RoomId = input.ReadString(); + break; + } + case 40: { + Online = input.ReadBool(); + break; + } + case 48: { + MessageType = input.ReadInt32(); + break; + } + case 58: { + Cmd = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UserId = input.ReadInt64(); + break; + } + case 18: { + NickName = input.ReadString(); + break; + } + case 26: { + RoleName = input.ReadString(); + break; + } + case 34: { + RoomId = input.ReadString(); + break; + } + case 40: { + Online = input.ReadBool(); + break; + } + case 48: { + MessageType = input.ReadInt32(); + break; + } + case 58: { + Cmd = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class RoomUserResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoomUserResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::JoinReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomUserResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomUserResponse(RoomUserResponse other) : this() { + userList_ = other.userList_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomUserResponse Clone() { + return new RoomUserResponse(this); + } + + /// Field number for the "userList" field. + public const int UserListFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_userList_codec + = pb::FieldCodec.ForMessage(10, global::UserJoinResponse.Parser); + private readonly pbc::RepeatedField userList_ = new pbc::RepeatedField(); + /// + ///鐢ㄦ埛鍒楄〃 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UserList { + get { return userList_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RoomUserResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoomUserResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!userList_.Equals(other.userList_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= userList_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + userList_.WriteTo(output, _repeated_userList_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + userList_.WriteTo(ref output, _repeated_userList_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += userList_.CalculateSize(_repeated_userList_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoomUserResponse other) { + if (other == null) { + return; + } + userList_.Add(other.userList_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + userList_.AddEntriesFrom(input, _repeated_userList_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + userList_.AddEntriesFrom(ref input, _repeated_userList_codec); + break; + } + } + } + } + #endif + +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/Join.cs.meta b/xiaofang/Assets/comm/Proto/Join.cs.meta new file mode 100644 index 00000000..1b6c2aaf --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Join.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 63abcfa0f6080534d8642cfb5eae1ac0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/MessageBroadcast.cs b/xiaofang/Assets/comm/Proto/MessageBroadcast.cs new file mode 100644 index 00000000..090d9636 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/MessageBroadcast.cs @@ -0,0 +1,525 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: message_broadcast.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from message_broadcast.proto +public static partial class MessageBroadcastReflection { + + #region Descriptor + /// File descriptor for message_broadcast.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MessageBroadcastReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChdtZXNzYWdlX2Jyb2FkY2FzdC5wcm90byJUChdNZXNzYWdlQnJvYWRjYXN0", + "UmVxdWVzdBIOCgZyb29tSWQYASABKAkSDAoEdHlwZRgCIAEoBRIOCgZyb2xl", + "SWQYAyABKAkSCwoDY21kGAQgASgJIhoKGE1lc3NhZ2VCcm9hZGNhc3RSZXNw", + "b25zZUIHWgUuLztwYmIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::MessageBroadcastRequest), global::MessageBroadcastRequest.Parser, new[]{ "RoomId", "Type", "RoleId", "Cmd" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::MessageBroadcastResponse), global::MessageBroadcastResponse.Parser, null, null, null, null, null) + })); + } + #endregion + +} +#region Messages +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class MessageBroadcastRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageBroadcastRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::MessageBroadcastReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MessageBroadcastRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MessageBroadcastRequest(MessageBroadcastRequest other) : this() { + roomId_ = other.roomId_; + type_ = other.type_; + roleId_ = other.roleId_; + cmd_ = other.cmd_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MessageBroadcastRequest Clone() { + return new MessageBroadcastRequest(this); + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 1; + private string roomId_ = ""; + /// + /// 鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 2; + private int type_; + /// + /// 娑堟伅绫诲瀷 1. 鏂囨湰 2. 鍥剧墖 3. 璇煶 4. 瑙嗛 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Type { + get { return type_; } + set { + type_ = value; + } + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 3; + private string roleId_ = ""; + /// + /// 瑙掕壊Id 濡傛灉涓虹┖灏辨槸缁欐墍鏈変汉鍙 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoleId { + get { return roleId_; } + set { + roleId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "cmd" field. + public const int CmdFieldNumber = 4; + private string cmd_ = ""; + /// + /// 鑷畾涔夊懡浠 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Cmd { + get { return cmd_; } + set { + cmd_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MessageBroadcastRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MessageBroadcastRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + if (Type != other.Type) return false; + if (RoleId != other.RoleId) return false; + if (Cmd != other.Cmd) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (Type != 0) hash ^= Type.GetHashCode(); + if (RoleId.Length != 0) hash ^= RoleId.GetHashCode(); + if (Cmd.Length != 0) hash ^= Cmd.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (Type != 0) { + output.WriteRawTag(16); + output.WriteInt32(Type); + } + if (RoleId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoleId); + } + if (Cmd.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Cmd); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (Type != 0) { + output.WriteRawTag(16); + output.WriteInt32(Type); + } + if (RoleId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoleId); + } + if (Cmd.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Cmd); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (Type != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); + } + if (RoleId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoleId); + } + if (Cmd.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Cmd); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MessageBroadcastRequest other) { + if (other == null) { + return; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.Type != 0) { + Type = other.Type; + } + if (other.RoleId.Length != 0) { + RoleId = other.RoleId; + } + if (other.Cmd.Length != 0) { + Cmd = other.Cmd; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + case 16: { + Type = input.ReadInt32(); + break; + } + case 26: { + RoleId = input.ReadString(); + break; + } + case 34: { + Cmd = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + case 16: { + Type = input.ReadInt32(); + break; + } + case 26: { + RoleId = input.ReadString(); + break; + } + case 34: { + Cmd = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class MessageBroadcastResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageBroadcastResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::MessageBroadcastReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MessageBroadcastResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MessageBroadcastResponse(MessageBroadcastResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MessageBroadcastResponse Clone() { + return new MessageBroadcastResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MessageBroadcastResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MessageBroadcastResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MessageBroadcastResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/MessageBroadcast.cs.meta b/xiaofang/Assets/comm/Proto/MessageBroadcast.cs.meta new file mode 100644 index 00000000..fab2149e --- /dev/null +++ b/xiaofang/Assets/comm/Proto/MessageBroadcast.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 061900a49550cc74582eb8e4598a886b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/Move.cs b/xiaofang/Assets/comm/Proto/Move.cs new file mode 100644 index 00000000..cd58110a --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Move.cs @@ -0,0 +1,1927 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: move.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from move.proto +public static partial class MoveReflection { + + #region Descriptor + /// File descriptor for move.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MoveReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cgptb3ZlLnByb3RvIiIKEE5wY0NyZWF0ZVJlcXVlc3QSDgoGcm9vbUlkGAEg", + "ASgJIhMKEU5wY0NyZWF0ZVJlc3BvbnNlIi8KC01vdmVSZXF1ZXN0Eg4KBnJv", + "b21JZBgBIAEoCRIQCghtb3ZlVHlwZRgCIAEoBSJKCgxNb3ZlUmVzcG9uc2US", + "DgoGdXNlcklkGAIgASgJEg4KBnJvb21JZBgDIAEoCRIaCghtb3ZlRGF0YRgB", + "IAMoCzIILk5wY0RhdGEifAoHTnBjRGF0YRIJCgF4GAEgASgCEgkKAXkYAiAB", + "KAISCQoBehgDIAEoAhIOCgZ1c2VySWQYBCABKAkSEAoIbmlja05hbWUYCCAB", + "KAkSDAoEdHlwZRgFIAEoBRIRCglmb3JtYXRpb24YBiABKAUSDQoFZXZlbnQY", + "ByABKAUiVQoSTW92ZVJvb21Bb2lSZXF1ZXN0Eg4KBnJvb21JZBgBIAEoCRIO", + "CgZ1c2VySWQYAiABKAMSCQoBeBgDIAEoAhIJCgF5GAQgASgCEgkKAXoYBSAB", + "KAIiFQoTTW92ZVJvb21Bb2lSZXNwb25zZUIHWgUuLztwYmIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::NpcCreateRequest), global::NpcCreateRequest.Parser, new[]{ "RoomId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::NpcCreateResponse), global::NpcCreateResponse.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::MoveRequest), global::MoveRequest.Parser, new[]{ "RoomId", "MoveType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::MoveResponse), global::MoveResponse.Parser, new[]{ "UserId", "RoomId", "MoveData" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::NpcData), global::NpcData.Parser, new[]{ "X", "Y", "Z", "UserId", "NickName", "Type", "Formation", "Event" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::MoveRoomAoiRequest), global::MoveRoomAoiRequest.Parser, new[]{ "RoomId", "UserId", "X", "Y", "Z" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::MoveRoomAoiResponse), global::MoveRoomAoiResponse.Parser, null, null, null, null, null) + })); + } + #endregion + +} +#region Messages +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class NpcCreateRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NpcCreateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::MoveReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NpcCreateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NpcCreateRequest(NpcCreateRequest other) : this() { + roomId_ = other.roomId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NpcCreateRequest Clone() { + return new NpcCreateRequest(this); + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 1; + private string roomId_ = ""; + /// + /// 鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NpcCreateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NpcCreateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NpcCreateRequest other) { + if (other == null) { + return; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class NpcCreateResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NpcCreateResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::MoveReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NpcCreateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NpcCreateResponse(NpcCreateResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NpcCreateResponse Clone() { + return new NpcCreateResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NpcCreateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NpcCreateResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NpcCreateResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class MoveRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MoveRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::MoveReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveRequest(MoveRequest other) : this() { + roomId_ = other.roomId_; + moveType_ = other.moveType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveRequest Clone() { + return new MoveRequest(this); + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 1; + private string roomId_ = ""; + /// + /// 鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "moveType" field. + public const int MoveTypeFieldNumber = 2; + private int moveType_; + /// + /// 绉诲姩绫诲瀷 1.绐楀瓙杈圭殑绉诲姩 2. 闂ㄨ竟鐨勭Щ鍔 3. 涓璧风Щ鍔 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MoveType { + get { return moveType_; } + set { + moveType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MoveRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MoveRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + if (MoveType != other.MoveType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (MoveType != 0) hash ^= MoveType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (MoveType != 0) { + output.WriteRawTag(16); + output.WriteInt32(MoveType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (MoveType != 0) { + output.WriteRawTag(16); + output.WriteInt32(MoveType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (MoveType != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MoveType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MoveRequest other) { + if (other == null) { + return; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.MoveType != 0) { + MoveType = other.MoveType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + case 16: { + MoveType = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + case 16: { + MoveType = input.ReadInt32(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class MoveResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MoveResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::MoveReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveResponse(MoveResponse other) : this() { + userId_ = other.userId_; + roomId_ = other.roomId_; + moveData_ = other.moveData_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveResponse Clone() { + return new MoveResponse(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 2; + private string userId_ = ""; + /// + /// 鐢ㄦ埛id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserId { + get { return userId_; } + set { + userId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 3; + private string roomId_ = ""; + /// + /// 鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "moveData" field. + public const int MoveDataFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_moveData_codec + = pb::FieldCodec.ForMessage(10, global::NpcData.Parser); + private readonly pbc::RepeatedField moveData_ = new pbc::RepeatedField(); + /// + /// 绉诲姩鏁版嵁 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MoveData { + get { return moveData_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MoveResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MoveResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (RoomId != other.RoomId) return false; + if(!moveData_.Equals(other.moveData_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId.Length != 0) hash ^= UserId.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + hash ^= moveData_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + moveData_.WriteTo(output, _repeated_moveData_codec); + if (UserId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(UserId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + moveData_.WriteTo(ref output, _repeated_moveData_codec); + if (UserId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(UserId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserId); + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + size += moveData_.CalculateSize(_repeated_moveData_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MoveResponse other) { + if (other == null) { + return; + } + if (other.UserId.Length != 0) { + UserId = other.UserId; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + moveData_.Add(other.moveData_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + moveData_.AddEntriesFrom(input, _repeated_moveData_codec); + break; + } + case 18: { + UserId = input.ReadString(); + break; + } + case 26: { + RoomId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + moveData_.AddEntriesFrom(ref input, _repeated_moveData_codec); + break; + } + case 18: { + UserId = input.ReadString(); + break; + } + case 26: { + RoomId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class NpcData : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NpcData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::MoveReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NpcData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NpcData(NpcData other) : this() { + x_ = other.x_; + y_ = other.y_; + z_ = other.z_; + userId_ = other.userId_; + nickName_ = other.nickName_; + type_ = other.type_; + formation_ = other.formation_; + event_ = other.event_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NpcData Clone() { + return new NpcData(this); + } + + /// Field number for the "x" field. + public const int XFieldNumber = 1; + private float x_; + /// + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float X { + get { return x_; } + set { + x_ = value; + } + } + + /// Field number for the "y" field. + public const int YFieldNumber = 2; + private float y_; + /// + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Y { + get { return y_; } + set { + y_ = value; + } + } + + /// Field number for the "z" field. + public const int ZFieldNumber = 3; + private float z_; + /// + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Z { + get { return z_; } + set { + z_ = value; + } + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 4; + private string userId_ = ""; + /// + /// 绉诲姩鐨刵pc鐨刬d + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserId { + get { return userId_; } + set { + userId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "nickName" field. + public const int NickNameFieldNumber = 8; + private string nickName_ = ""; + /// + /// 鏄电О + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NickName { + get { return nickName_; } + set { + nickName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 5; + private int type_; + /// + /// 绫诲瀷 1 鐜╁ 2 NPC + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Type { + get { return type_; } + set { + type_ = value; + } + } + + /// Field number for the "formation" field. + public const int FormationFieldNumber = 6; + private int formation_; + /// + /// 涓嬫ゼ瀵瑰簲鐨勯樀鍨 1-闈犱袱渚 2-骞舵帓 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Formation { + get { return formation_; } + set { + formation_ = value; + } + } + + /// Field number for the "event" field. + public const int EventFieldNumber = 7; + private int event_; + /// + /// 1 杩涘叆 2 淇濇寔 3 绂诲紑 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Event { + get { return event_; } + set { + event_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NpcData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NpcData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Z, other.Z)) return false; + if (UserId != other.UserId) return false; + if (NickName != other.NickName) return false; + if (Type != other.Type) return false; + if (Formation != other.Formation) return false; + if (Event != other.Event) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X); + if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y); + if (Z != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Z); + if (UserId.Length != 0) hash ^= UserId.GetHashCode(); + if (NickName.Length != 0) hash ^= NickName.GetHashCode(); + if (Type != 0) hash ^= Type.GetHashCode(); + if (Formation != 0) hash ^= Formation.GetHashCode(); + if (Event != 0) hash ^= Event.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (X != 0F) { + output.WriteRawTag(13); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(29); + output.WriteFloat(Z); + } + if (UserId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(UserId); + } + if (Type != 0) { + output.WriteRawTag(40); + output.WriteInt32(Type); + } + if (Formation != 0) { + output.WriteRawTag(48); + output.WriteInt32(Formation); + } + if (Event != 0) { + output.WriteRawTag(56); + output.WriteInt32(Event); + } + if (NickName.Length != 0) { + output.WriteRawTag(66); + output.WriteString(NickName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (X != 0F) { + output.WriteRawTag(13); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(29); + output.WriteFloat(Z); + } + if (UserId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(UserId); + } + if (Type != 0) { + output.WriteRawTag(40); + output.WriteInt32(Type); + } + if (Formation != 0) { + output.WriteRawTag(48); + output.WriteInt32(Formation); + } + if (Event != 0) { + output.WriteRawTag(56); + output.WriteInt32(Event); + } + if (NickName.Length != 0) { + output.WriteRawTag(66); + output.WriteString(NickName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (X != 0F) { + size += 1 + 4; + } + if (Y != 0F) { + size += 1 + 4; + } + if (Z != 0F) { + size += 1 + 4; + } + if (UserId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserId); + } + if (NickName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NickName); + } + if (Type != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); + } + if (Formation != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Formation); + } + if (Event != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Event); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NpcData other) { + if (other == null) { + return; + } + if (other.X != 0F) { + X = other.X; + } + if (other.Y != 0F) { + Y = other.Y; + } + if (other.Z != 0F) { + Z = other.Z; + } + if (other.UserId.Length != 0) { + UserId = other.UserId; + } + if (other.NickName.Length != 0) { + NickName = other.NickName; + } + if (other.Type != 0) { + Type = other.Type; + } + if (other.Formation != 0) { + Formation = other.Formation; + } + if (other.Event != 0) { + Event = other.Event; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + X = input.ReadFloat(); + break; + } + case 21: { + Y = input.ReadFloat(); + break; + } + case 29: { + Z = input.ReadFloat(); + break; + } + case 34: { + UserId = input.ReadString(); + break; + } + case 40: { + Type = input.ReadInt32(); + break; + } + case 48: { + Formation = input.ReadInt32(); + break; + } + case 56: { + Event = input.ReadInt32(); + break; + } + case 66: { + NickName = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 13: { + X = input.ReadFloat(); + break; + } + case 21: { + Y = input.ReadFloat(); + break; + } + case 29: { + Z = input.ReadFloat(); + break; + } + case 34: { + UserId = input.ReadString(); + break; + } + case 40: { + Type = input.ReadInt32(); + break; + } + case 48: { + Formation = input.ReadInt32(); + break; + } + case 56: { + Event = input.ReadInt32(); + break; + } + case 66: { + NickName = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class MoveRoomAoiRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MoveRoomAoiRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::MoveReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveRoomAoiRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveRoomAoiRequest(MoveRoomAoiRequest other) : this() { + roomId_ = other.roomId_; + userId_ = other.userId_; + x_ = other.x_; + y_ = other.y_; + z_ = other.z_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveRoomAoiRequest Clone() { + return new MoveRoomAoiRequest(this); + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 1; + private string roomId_ = ""; + /// + /// 鎴块棿Id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 2; + private long userId_; + /// + /// 鐢ㄦ埛Id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "x" field. + public const int XFieldNumber = 3; + private float x_; + /// + /// x + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float X { + get { return x_; } + set { + x_ = value; + } + } + + /// Field number for the "y" field. + public const int YFieldNumber = 4; + private float y_; + /// + /// y + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Y { + get { return y_; } + set { + y_ = value; + } + } + + /// Field number for the "z" field. + public const int ZFieldNumber = 5; + private float z_; + /// + /// z + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Z { + get { return z_; } + set { + z_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MoveRoomAoiRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MoveRoomAoiRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + if (UserId != other.UserId) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Z, other.Z)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X); + if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y); + if (Z != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Z); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (UserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(UserId); + } + if (X != 0F) { + output.WriteRawTag(29); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(45); + output.WriteFloat(Z); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (UserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(UserId); + } + if (X != 0F) { + output.WriteRawTag(29); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(45); + output.WriteFloat(Z); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (UserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); + } + if (X != 0F) { + size += 1 + 4; + } + if (Y != 0F) { + size += 1 + 4; + } + if (Z != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MoveRoomAoiRequest other) { + if (other == null) { + return; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.UserId != 0L) { + UserId = other.UserId; + } + if (other.X != 0F) { + X = other.X; + } + if (other.Y != 0F) { + Y = other.Y; + } + if (other.Z != 0F) { + Z = other.Z; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + case 16: { + UserId = input.ReadInt64(); + break; + } + case 29: { + X = input.ReadFloat(); + break; + } + case 37: { + Y = input.ReadFloat(); + break; + } + case 45: { + Z = input.ReadFloat(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + case 16: { + UserId = input.ReadInt64(); + break; + } + case 29: { + X = input.ReadFloat(); + break; + } + case 37: { + Y = input.ReadFloat(); + break; + } + case 45: { + Z = input.ReadFloat(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class MoveRoomAoiResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MoveRoomAoiResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::MoveReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveRoomAoiResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveRoomAoiResponse(MoveRoomAoiResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MoveRoomAoiResponse Clone() { + return new MoveRoomAoiResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MoveRoomAoiResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MoveRoomAoiResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MoveRoomAoiResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/Move.cs.meta b/xiaofang/Assets/comm/Proto/Move.cs.meta new file mode 100644 index 00000000..aaef8006 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Move.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3b549e9113344b542a6f785f98166927 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/Prop.cs b/xiaofang/Assets/comm/Proto/Prop.cs new file mode 100644 index 00000000..8ddccef3 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Prop.cs @@ -0,0 +1,1921 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: prop.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from prop.proto +public static partial class PropReflection { + + #region Descriptor + /// File descriptor for prop.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static PropReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cgpwcm9wLnByb3RvIlMKC1Byb3BSZXF1ZXN0Eg4KBnByb3BJZBgBIAEoBRIO", + "CgZhY3Rpb24YAiABKAUSFAoMcHJvcFNlcnZlcklkGAMgASgJEg4KBnJvb21J", + "ZBgEIAEoCSJhCgxQcm9wUmVzcG9uc2USDgoGcHJvcElkGAEgASgFEhQKDHBy", + "b3BTZXJ2ZXJJZBgFIAEoCRIMCgRuYW1lGAIgASgJEgwKBGNvZGUYAyABKAUS", + "DwoHbWVzc2FnZRgEIAEoCSIeChBQcm9wTW9kZWxSZXF1ZXN0EgoKAmlkGAEg", + "ASgFIvYCChFQcm9wTW9kZWxSZXNwb25zZRIKCgJpZBgBIAEoCRIQCghjYXRl", + "Z29yeRgCIAEoCRIMCgROb3RlGAMgASgJEgwKBE5hbWUYBCABKAkSDgoGV2Vp", + "Z2h0GAUgASgJEg0KBVNjZW5lGAYgASgJEgwKBEljb24YByABKAkSDwoHUmVz", + "UGF0aBgIIAEoCRIWCg5Db25zdW1hYmxlVHlwZRgJIAEoCRIRCglEdXJhdGlv", + "bnMYCiABKAkSEAoISXNQaWNrdXAYCyABKAkSCwoDTnVtGAwgASgFEhMKC0Nh", + "bGN1bGF0aW9uGA0gASgIEhAKCExvc3NUaW1lGA4gASgFEhQKDFByb3BTZXJ2", + "ZXJJZBgPIAEoCRIMCgRVc2VkGBAgASgIEg4KBlVzZXJJZBgRIAEoCRIOCgZS", + "b29tSWQYEiABKAkSEAoIVG90YWxOdW0YEyABKAUSDwoHUmVzdE51bRgUIAEo", + "BRIRCglBdHRyaWJ1dGUYFSABKAlCB1oFLi87cGJiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::PropRequest), global::PropRequest.Parser, new[]{ "PropId", "Action", "PropServerId", "RoomId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::PropResponse), global::PropResponse.Parser, new[]{ "PropId", "PropServerId", "Name", "Code", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::PropModelRequest), global::PropModelRequest.Parser, new[]{ "Id" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::PropModelResponse), global::PropModelResponse.Parser, new[]{ "Id", "Category", "Note", "Name", "Weight", "Scene", "Icon", "ResPath", "ConsumableType", "Durations", "IsPickup", "Num", "Calculation", "LossTime", "PropServerId", "Used", "UserId", "RoomId", "TotalNum", "RestNum", "Attribute" }, null, null, null, null) + })); + } + #endregion + +} +#region Messages +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class PropRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PropRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::PropReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropRequest(PropRequest other) : this() { + propId_ = other.propId_; + action_ = other.action_; + propServerId_ = other.propServerId_; + roomId_ = other.roomId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropRequest Clone() { + return new PropRequest(this); + } + + /// Field number for the "propId" field. + public const int PropIdFieldNumber = 1; + private int propId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PropId { + get { return propId_; } + set { + propId_ = value; + } + } + + /// Field number for the "action" field. + public const int ActionFieldNumber = 2; + private int action_; + /// + /// 1 浣跨敤 2 涓㈠純 3 杞氦 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Action { + get { return action_; } + set { + action_ = value; + } + } + + /// Field number for the "propServerId" field. + public const int PropServerIdFieldNumber = 3; + private string propServerId_ = ""; + /// + /// 鏈嶅姟绔疘D 涓嶅瓨鍦ㄨ繖涓猧d鐨勬椂鍊欎负-1 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PropServerId { + get { return propServerId_; } + set { + propServerId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 4; + private string roomId_ = ""; + /// + /// 鎴块棿ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PropRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PropRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (PropId != other.PropId) return false; + if (Action != other.Action) return false; + if (PropServerId != other.PropServerId) return false; + if (RoomId != other.RoomId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (PropId != 0) hash ^= PropId.GetHashCode(); + if (Action != 0) hash ^= Action.GetHashCode(); + if (PropServerId.Length != 0) hash ^= PropServerId.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (PropId != 0) { + output.WriteRawTag(8); + output.WriteInt32(PropId); + } + if (Action != 0) { + output.WriteRawTag(16); + output.WriteInt32(Action); + } + if (PropServerId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PropServerId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PropId != 0) { + output.WriteRawTag(8); + output.WriteInt32(PropId); + } + if (Action != 0) { + output.WriteRawTag(16); + output.WriteInt32(Action); + } + if (PropServerId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PropServerId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (PropId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PropId); + } + if (Action != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Action); + } + if (PropServerId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PropServerId); + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PropRequest other) { + if (other == null) { + return; + } + if (other.PropId != 0) { + PropId = other.PropId; + } + if (other.Action != 0) { + Action = other.Action; + } + if (other.PropServerId.Length != 0) { + PropServerId = other.PropServerId; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + PropId = input.ReadInt32(); + break; + } + case 16: { + Action = input.ReadInt32(); + break; + } + case 26: { + PropServerId = input.ReadString(); + break; + } + case 34: { + RoomId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + PropId = input.ReadInt32(); + break; + } + case 16: { + Action = input.ReadInt32(); + break; + } + case 26: { + PropServerId = input.ReadString(); + break; + } + case 34: { + RoomId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class PropResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PropResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::PropReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropResponse(PropResponse other) : this() { + propId_ = other.propId_; + propServerId_ = other.propServerId_; + name_ = other.name_; + code_ = other.code_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropResponse Clone() { + return new PropResponse(this); + } + + /// Field number for the "propId" field. + public const int PropIdFieldNumber = 1; + private int propId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PropId { + get { return propId_; } + set { + propId_ = value; + } + } + + /// Field number for the "propServerId" field. + public const int PropServerIdFieldNumber = 5; + private string propServerId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PropServerId { + get { return propServerId_; } + set { + propServerId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 3; + private int code_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Code { + get { return code_; } + set { + code_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PropResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PropResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (PropId != other.PropId) return false; + if (PropServerId != other.PropServerId) return false; + if (Name != other.Name) return false; + if (Code != other.Code) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (PropId != 0) hash ^= PropId.GetHashCode(); + if (PropServerId.Length != 0) hash ^= PropServerId.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Code != 0) hash ^= Code.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (PropId != 0) { + output.WriteRawTag(8); + output.WriteInt32(PropId); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (Code != 0) { + output.WriteRawTag(24); + output.WriteInt32(Code); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (PropServerId.Length != 0) { + output.WriteRawTag(42); + output.WriteString(PropServerId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PropId != 0) { + output.WriteRawTag(8); + output.WriteInt32(PropId); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (Code != 0) { + output.WriteRawTag(24); + output.WriteInt32(Code); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (PropServerId.Length != 0) { + output.WriteRawTag(42); + output.WriteString(PropServerId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (PropId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PropId); + } + if (PropServerId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PropServerId); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Code != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PropResponse other) { + if (other == null) { + return; + } + if (other.PropId != 0) { + PropId = other.PropId; + } + if (other.PropServerId.Length != 0) { + PropServerId = other.PropServerId; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Code != 0) { + Code = other.Code; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + PropId = input.ReadInt32(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + Code = input.ReadInt32(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + case 42: { + PropServerId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + PropId = input.ReadInt32(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + Code = input.ReadInt32(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + case 42: { + PropServerId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class PropModelRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PropModelRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::PropReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropModelRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropModelRequest(PropModelRequest other) : this() { + id_ = other.id_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropModelRequest Clone() { + return new PropModelRequest(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private int id_; + /// + /// 閬撳叿ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Id { + get { return id_; } + set { + id_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PropModelRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PropModelRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PropModelRequest other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class PropModelResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PropModelResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::PropReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropModelResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropModelResponse(PropModelResponse other) : this() { + id_ = other.id_; + category_ = other.category_; + note_ = other.note_; + name_ = other.name_; + weight_ = other.weight_; + scene_ = other.scene_; + icon_ = other.icon_; + resPath_ = other.resPath_; + consumableType_ = other.consumableType_; + durations_ = other.durations_; + isPickup_ = other.isPickup_; + num_ = other.num_; + calculation_ = other.calculation_; + lossTime_ = other.lossTime_; + propServerId_ = other.propServerId_; + used_ = other.used_; + userId_ = other.userId_; + roomId_ = other.roomId_; + totalNum_ = other.totalNum_; + restNum_ = other.restNum_; + attribute_ = other.attribute_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PropModelResponse Clone() { + return new PropModelResponse(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private string id_ = ""; + /// + /// 鐗╄祫id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "category" field. + public const int CategoryFieldNumber = 2; + private string category_ = ""; + /// + /// 鐗╄祫鍒嗙被 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Category { + get { return category_; } + set { + category_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Note" field. + public const int NoteFieldNumber = 3; + private string note_ = ""; + /// + /// 澶囨敞 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Note { + get { return note_; } + set { + note_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Name" field. + public const int NameFieldNumber = 4; + private string name_ = ""; + /// + /// 鍏宠仈鍒版枃鏈〃ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Weight" field. + public const int WeightFieldNumber = 5; + private string weight_ = ""; + /// + /// 閲嶉噺 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Weight { + get { return weight_; } + set { + weight_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Scene" field. + public const int SceneFieldNumber = 6; + private string scene_ = ""; + /// + /// 浣跨敤鍦烘櫙 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Scene { + get { return scene_; } + set { + scene_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Icon" field. + public const int IconFieldNumber = 7; + private string icon_ = ""; + /// + /// 鍥炬爣 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Icon { + get { return icon_; } + set { + icon_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ResPath" field. + public const int ResPathFieldNumber = 8; + private string resPath_ = ""; + /// + /// 鍥剧墖璧勬簮 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ResPath { + get { return resPath_; } + set { + resPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ConsumableType" field. + public const int ConsumableTypeFieldNumber = 9; + private string consumableType_ = ""; + /// + /// 鏄惁娑堣楀搧 0=闈炴秷鑰楀搧 1=娑堣楀搧 2=绌挎埓绫 3=鍙┛鎴存秷鑰楀搧 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ConsumableType { + get { return consumableType_; } + set { + consumableType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Durations" field. + public const int DurationsFieldNumber = 10; + private string durations_ = ""; + /// + /// 鏈夋晥鏃堕棿 -1 鏃犻檺鍒 鍗曚綅 绉 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Durations { + get { return durations_; } + set { + durations_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "IsPickup" field. + public const int IsPickupFieldNumber = 11; + private string isPickup_ = ""; + /// + /// 鍙鎷惧彇 鑱屼笟ID1,鏄惁鍙嬀鍙1|鑱屼笟ID2,鏄惁鍙嬀鍙2 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IsPickup { + get { return isPickup_; } + set { + isPickup_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Num" field. + public const int NumFieldNumber = 12; + private int num_; + /// + /// 閬撳叿鏁伴噺 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Num { + get { return num_; } + set { + num_ = value; + } + } + + /// Field number for the "Calculation" field. + public const int CalculationFieldNumber = 13; + private bool calculation_; + /// + /// 鏄惁璁$畻灞炴 true=璁$畻 false=涓嶈绠 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Calculation { + get { return calculation_; } + set { + calculation_ = value; + } + } + + /// Field number for the "LossTime" field. + public const int LossTimeFieldNumber = 14; + private int lossTime_; + /// + /// 鍓╀綑鏃堕棿 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int LossTime { + get { return lossTime_; } + set { + lossTime_ = value; + } + } + + /// Field number for the "PropServerId" field. + public const int PropServerIdFieldNumber = 15; + private string propServerId_ = ""; + /// + /// 閬撳叿鏈嶅姟鍣↖D + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PropServerId { + get { return propServerId_; } + set { + propServerId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Used" field. + public const int UsedFieldNumber = 16; + private bool used_; + /// + /// 鏄惁姝e湪浣跨敤 true=姝e湪浣跨敤 false=鏈娇鐢 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Used { + get { return used_; } + set { + used_ = value; + } + } + + /// Field number for the "UserId" field. + public const int UserIdFieldNumber = 17; + private string userId_ = ""; + /// + /// 鐢ㄦ埛ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserId { + get { return userId_; } + set { + userId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "RoomId" field. + public const int RoomIdFieldNumber = 18; + private string roomId_ = ""; + /// + /// 鎴块棿ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TotalNum" field. + public const int TotalNumFieldNumber = 19; + private int totalNum_; + /// + /// 鎬绘暟閲 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TotalNum { + get { return totalNum_; } + set { + totalNum_ = value; + } + } + + /// Field number for the "RestNum" field. + public const int RestNumFieldNumber = 20; + private int restNum_; + /// + /// 鍓╀綑鏁伴噺 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RestNum { + get { return restNum_; } + set { + restNum_ = value; + } + } + + /// Field number for the "Attribute" field. + public const int AttributeFieldNumber = 21; + private string attribute_ = ""; + /// + /// 灞炴х绫,灞炴у + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Attribute { + get { return attribute_; } + set { + attribute_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PropModelResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PropModelResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Category != other.Category) return false; + if (Note != other.Note) return false; + if (Name != other.Name) return false; + if (Weight != other.Weight) return false; + if (Scene != other.Scene) return false; + if (Icon != other.Icon) return false; + if (ResPath != other.ResPath) return false; + if (ConsumableType != other.ConsumableType) return false; + if (Durations != other.Durations) return false; + if (IsPickup != other.IsPickup) return false; + if (Num != other.Num) return false; + if (Calculation != other.Calculation) return false; + if (LossTime != other.LossTime) return false; + if (PropServerId != other.PropServerId) return false; + if (Used != other.Used) return false; + if (UserId != other.UserId) return false; + if (RoomId != other.RoomId) return false; + if (TotalNum != other.TotalNum) return false; + if (RestNum != other.RestNum) return false; + if (Attribute != other.Attribute) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (Category.Length != 0) hash ^= Category.GetHashCode(); + if (Note.Length != 0) hash ^= Note.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Weight.Length != 0) hash ^= Weight.GetHashCode(); + if (Scene.Length != 0) hash ^= Scene.GetHashCode(); + if (Icon.Length != 0) hash ^= Icon.GetHashCode(); + if (ResPath.Length != 0) hash ^= ResPath.GetHashCode(); + if (ConsumableType.Length != 0) hash ^= ConsumableType.GetHashCode(); + if (Durations.Length != 0) hash ^= Durations.GetHashCode(); + if (IsPickup.Length != 0) hash ^= IsPickup.GetHashCode(); + if (Num != 0) hash ^= Num.GetHashCode(); + if (Calculation != false) hash ^= Calculation.GetHashCode(); + if (LossTime != 0) hash ^= LossTime.GetHashCode(); + if (PropServerId.Length != 0) hash ^= PropServerId.GetHashCode(); + if (Used != false) hash ^= Used.GetHashCode(); + if (UserId.Length != 0) hash ^= UserId.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (TotalNum != 0) hash ^= TotalNum.GetHashCode(); + if (RestNum != 0) hash ^= RestNum.GetHashCode(); + if (Attribute.Length != 0) hash ^= Attribute.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (Category.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Category); + } + if (Note.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Note); + } + if (Name.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Name); + } + if (Weight.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Weight); + } + if (Scene.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Scene); + } + if (Icon.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Icon); + } + if (ResPath.Length != 0) { + output.WriteRawTag(66); + output.WriteString(ResPath); + } + if (ConsumableType.Length != 0) { + output.WriteRawTag(74); + output.WriteString(ConsumableType); + } + if (Durations.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Durations); + } + if (IsPickup.Length != 0) { + output.WriteRawTag(90); + output.WriteString(IsPickup); + } + if (Num != 0) { + output.WriteRawTag(96); + output.WriteInt32(Num); + } + if (Calculation != false) { + output.WriteRawTag(104); + output.WriteBool(Calculation); + } + if (LossTime != 0) { + output.WriteRawTag(112); + output.WriteInt32(LossTime); + } + if (PropServerId.Length != 0) { + output.WriteRawTag(122); + output.WriteString(PropServerId); + } + if (Used != false) { + output.WriteRawTag(128, 1); + output.WriteBool(Used); + } + if (UserId.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(UserId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(146, 1); + output.WriteString(RoomId); + } + if (TotalNum != 0) { + output.WriteRawTag(152, 1); + output.WriteInt32(TotalNum); + } + if (RestNum != 0) { + output.WriteRawTag(160, 1); + output.WriteInt32(RestNum); + } + if (Attribute.Length != 0) { + output.WriteRawTag(170, 1); + output.WriteString(Attribute); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (Category.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Category); + } + if (Note.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Note); + } + if (Name.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Name); + } + if (Weight.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Weight); + } + if (Scene.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Scene); + } + if (Icon.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Icon); + } + if (ResPath.Length != 0) { + output.WriteRawTag(66); + output.WriteString(ResPath); + } + if (ConsumableType.Length != 0) { + output.WriteRawTag(74); + output.WriteString(ConsumableType); + } + if (Durations.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Durations); + } + if (IsPickup.Length != 0) { + output.WriteRawTag(90); + output.WriteString(IsPickup); + } + if (Num != 0) { + output.WriteRawTag(96); + output.WriteInt32(Num); + } + if (Calculation != false) { + output.WriteRawTag(104); + output.WriteBool(Calculation); + } + if (LossTime != 0) { + output.WriteRawTag(112); + output.WriteInt32(LossTime); + } + if (PropServerId.Length != 0) { + output.WriteRawTag(122); + output.WriteString(PropServerId); + } + if (Used != false) { + output.WriteRawTag(128, 1); + output.WriteBool(Used); + } + if (UserId.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(UserId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(146, 1); + output.WriteString(RoomId); + } + if (TotalNum != 0) { + output.WriteRawTag(152, 1); + output.WriteInt32(TotalNum); + } + if (RestNum != 0) { + output.WriteRawTag(160, 1); + output.WriteInt32(RestNum); + } + if (Attribute.Length != 0) { + output.WriteRawTag(170, 1); + output.WriteString(Attribute); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } + if (Category.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Category); + } + if (Note.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Note); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Weight.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Weight); + } + if (Scene.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Scene); + } + if (Icon.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Icon); + } + if (ResPath.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ResPath); + } + if (ConsumableType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ConsumableType); + } + if (Durations.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Durations); + } + if (IsPickup.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IsPickup); + } + if (Num != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Num); + } + if (Calculation != false) { + size += 1 + 1; + } + if (LossTime != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(LossTime); + } + if (PropServerId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PropServerId); + } + if (Used != false) { + size += 2 + 1; + } + if (UserId.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(UserId); + } + if (RoomId.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (TotalNum != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(TotalNum); + } + if (RestNum != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(RestNum); + } + if (Attribute.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Attribute); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PropModelResponse other) { + if (other == null) { + return; + } + if (other.Id.Length != 0) { + Id = other.Id; + } + if (other.Category.Length != 0) { + Category = other.Category; + } + if (other.Note.Length != 0) { + Note = other.Note; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Weight.Length != 0) { + Weight = other.Weight; + } + if (other.Scene.Length != 0) { + Scene = other.Scene; + } + if (other.Icon.Length != 0) { + Icon = other.Icon; + } + if (other.ResPath.Length != 0) { + ResPath = other.ResPath; + } + if (other.ConsumableType.Length != 0) { + ConsumableType = other.ConsumableType; + } + if (other.Durations.Length != 0) { + Durations = other.Durations; + } + if (other.IsPickup.Length != 0) { + IsPickup = other.IsPickup; + } + if (other.Num != 0) { + Num = other.Num; + } + if (other.Calculation != false) { + Calculation = other.Calculation; + } + if (other.LossTime != 0) { + LossTime = other.LossTime; + } + if (other.PropServerId.Length != 0) { + PropServerId = other.PropServerId; + } + if (other.Used != false) { + Used = other.Used; + } + if (other.UserId.Length != 0) { + UserId = other.UserId; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.TotalNum != 0) { + TotalNum = other.TotalNum; + } + if (other.RestNum != 0) { + RestNum = other.RestNum; + } + if (other.Attribute.Length != 0) { + Attribute = other.Attribute; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Id = input.ReadString(); + break; + } + case 18: { + Category = input.ReadString(); + break; + } + case 26: { + Note = input.ReadString(); + break; + } + case 34: { + Name = input.ReadString(); + break; + } + case 42: { + Weight = input.ReadString(); + break; + } + case 50: { + Scene = input.ReadString(); + break; + } + case 58: { + Icon = input.ReadString(); + break; + } + case 66: { + ResPath = input.ReadString(); + break; + } + case 74: { + ConsumableType = input.ReadString(); + break; + } + case 82: { + Durations = input.ReadString(); + break; + } + case 90: { + IsPickup = input.ReadString(); + break; + } + case 96: { + Num = input.ReadInt32(); + break; + } + case 104: { + Calculation = input.ReadBool(); + break; + } + case 112: { + LossTime = input.ReadInt32(); + break; + } + case 122: { + PropServerId = input.ReadString(); + break; + } + case 128: { + Used = input.ReadBool(); + break; + } + case 138: { + UserId = input.ReadString(); + break; + } + case 146: { + RoomId = input.ReadString(); + break; + } + case 152: { + TotalNum = input.ReadInt32(); + break; + } + case 160: { + RestNum = input.ReadInt32(); + break; + } + case 170: { + Attribute = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Id = input.ReadString(); + break; + } + case 18: { + Category = input.ReadString(); + break; + } + case 26: { + Note = input.ReadString(); + break; + } + case 34: { + Name = input.ReadString(); + break; + } + case 42: { + Weight = input.ReadString(); + break; + } + case 50: { + Scene = input.ReadString(); + break; + } + case 58: { + Icon = input.ReadString(); + break; + } + case 66: { + ResPath = input.ReadString(); + break; + } + case 74: { + ConsumableType = input.ReadString(); + break; + } + case 82: { + Durations = input.ReadString(); + break; + } + case 90: { + IsPickup = input.ReadString(); + break; + } + case 96: { + Num = input.ReadInt32(); + break; + } + case 104: { + Calculation = input.ReadBool(); + break; + } + case 112: { + LossTime = input.ReadInt32(); + break; + } + case 122: { + PropServerId = input.ReadString(); + break; + } + case 128: { + Used = input.ReadBool(); + break; + } + case 138: { + UserId = input.ReadString(); + break; + } + case 146: { + RoomId = input.ReadString(); + break; + } + case 152: { + TotalNum = input.ReadInt32(); + break; + } + case 160: { + RestNum = input.ReadInt32(); + break; + } + case 170: { + Attribute = input.ReadString(); + break; + } + } + } + } + #endif + +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/Prop.cs.meta b/xiaofang/Assets/comm/Proto/Prop.cs.meta new file mode 100644 index 00000000..c8ce4cfa --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Prop.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 66a0cd6fc174b4042b409c9030c08516 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/ProtoBufffer.cs b/xiaofang/Assets/comm/Proto/ProtoBufffer.cs new file mode 100644 index 00000000..46b1d5a6 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/ProtoBufffer.cs @@ -0,0 +1,28 @@ +using Google.Protobuf; +using System; +public class ProtoBufffer +{ + public static byte[] Serialize(IMessage message) + { + return message.ToByteArray(); + } + + public static T DeSerialize(byte[] packet) where T : IMessage, new() + { + IMessage message = new T(); + try + { + return (T)message.Descriptor.Parser.ParseFrom(packet); + } + catch (System.Exception e) + { + throw; + } + } + + internal static T DeSerialize(ByteString data) + { + throw new NotImplementedException(); + } +} + diff --git a/xiaofang/Assets/comm/Proto/ProtoBufffer.cs.meta b/xiaofang/Assets/comm/Proto/ProtoBufffer.cs.meta new file mode 100644 index 00000000..0c279cd2 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/ProtoBufffer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 09a7d1a0777441d489f8b7ffae5077c9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/Room.cs b/xiaofang/Assets/comm/Proto/Room.cs new file mode 100644 index 00000000..e138e5de --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Room.cs @@ -0,0 +1,2750 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: room.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from room.proto +public static partial class RoomReflection { + + #region Descriptor + /// File descriptor for room.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static RoomReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cgpyb29tLnByb3RvIvMCChRSb29tVGVtcGxhdGVSZXNwb25zZRIKCgJJZBgB", + "IAEoAxIUCgxUZW1wbGF0ZU5hbWUYAiABKAkSEQoJQ29tcGFueUlkGAMgASgJ", + "Eg8KB1NjZW5lSWQYBCABKAkSEQoJU3ViamVjdElkGAUgASgJEg4KBlN0YXR1", + "cxgGIAEoCRISCgpJc1RlbXBsYXRlGAcgASgJEhAKCENyZWF0ZUJ5GAggASgJ", + "EhIKCkNyZWF0ZVRpbWUYCSABKAkSEAoIVXBkYXRlQnkYCiABKAkSEgoKVXBk", + "YXRlVGltZRgLIAEoCRIOCgZSZW1hcmsYDCABKAkSDAoETW9kZRgNIAEoCRIY", + "ChBEaXNhc3RlckxvY2F0aW9uGA4gASgJEhAKCEZpcmV3YWxsGA8gASgJEiEK", + "C3Rhc2tPcm1EYXRhGBAgAygLMgwuVGFza09ybURhdGESJQoNc2VsZWN0T3Jt", + "RGF0YRgRIAMoCzIOLlNlbGVjdE9ybURhdGEi1QMKC1Rhc2tPcm1EYXRhEgoK", + "AklkGAEgASgDEhAKCFRhc2tOYW1lGAIgASgJEhAKCEdhbWVOYW1lGAMgASgJ", + "EhAKCEdhbWVUeXBlGAQgASgFEhAKCEdhbWVEZXNjGAUgASgJEhYKDkdhbWVQ", + "bGF5U2NyaXB0GAYgASgJEhMKC0dhbWVUcmlnZ2VyGAcgASgJEhgKEEdhbWVU", + "cmlnZ2VyTG9naWMYCCABKAkSFwoPR2FtZU92ZXJzZWVDb25kGAkgASgJEhUK", + "DUdhbWVUaW1lTGltaXQYCiABKAkSEAoIR2FtZVJvbGUYCyABKAkSEwoLR2Ft", + "ZVNlbGVjdHMYDCABKAkSFgoOR2FtZVRhcmdldFR5cGUYDSABKAkSGAoQR2Ft", + "ZVRhcmdldHNGaXJzdBgOIAEoCRIZChFHYW1lVGFyZ2V0c1NlY29uZBgPIAEo", + "CRIeChZHYW1lVGFyZ2V0c1NlY29uZExvZ2ljGBAgASgJEhYKDkdhbWVFeHRy", + "YVZhbHVlGBEgASgJEhAKCEdhbWVTb3J0GBIgASgJEhIKCkdhbWVJc1Nob3cY", + "EyABKAkSFQoNR2FtZUV4Y2x1c2l2ZRgUIAEoCRISCgpHYW1lUmV3YXJkGBUg", + "ASgJIp4DCg1TZWxlY3RPcm1EYXRhEgoKAklkGAEgASgDEgwKBE5vdGUYAiAB", + "KAkSDQoFR3JvdXAYAyABKAkSEAoIU2hvd1RleHQYBCABKAkSDAoESWNvbhgF", + "IAEoCRIVCg1QcmVjb25kaXRpb25zGAYgASgJEhEKCUV4Y2x1c2l2ZRgHIAEo", + "CRIQCghUYXNrVGltZRgIIAEoAxIRCglUaW1lTGltaXQYCSABKAMSEgoKTmV4", + "dFNlbGVjdBgKIAEoCRIQCghUYXNrTGluaxgLIAEoCRIXCg9UYXNrTGlua0Rl", + "dGFpbHMYDCABKAkSEAoIQ2FsbE1vZGUYDSABKAkSFQoNQ2FsbFJlY2lwaWVu", + "dBgOIAEoCRIVCg1Db3JyZWN0T3B0aW9uGA8gASgJEg4KBlJld2FyZBgQIAEo", + "CRIOCgZSZXN1bHQYESABKAkSDQoFUm91dGUYEiABKAkSFAoMVGltaW5nQ2hh", + "bmdlGBMgASgJEhEKCUFwcGxpZWRVSRgUIAEoCRIRCglVSURldGFpbHMYFSAB", + "KAkSCwoDU2VxGBYgASgJQgdaBS4vO3BiYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::RoomTemplateResponse), global::RoomTemplateResponse.Parser, new[]{ "Id", "TemplateName", "CompanyId", "SceneId", "SubjectId", "Status", "IsTemplate", "CreateBy", "CreateTime", "UpdateBy", "UpdateTime", "Remark", "Mode", "DisasterLocation", "Firewall", "TaskOrmData", "SelectOrmData" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::TaskOrmData), global::TaskOrmData.Parser, new[]{ "Id", "TaskName", "GameName", "GameType", "GameDesc", "GamePlayScript", "GameTrigger", "GameTriggerLogic", "GameOverseeCond", "GameTimeLimit", "GameRole", "GameSelects", "GameTargetType", "GameTargetsFirst", "GameTargetsSecond", "GameTargetsSecondLogic", "GameExtraValue", "GameSort", "GameIsShow", "GameExclusive", "GameReward" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::SelectOrmData), global::SelectOrmData.Parser, new[]{ "Id", "Note", "Group", "ShowText", "Icon", "Preconditions", "Exclusive", "TaskTime", "TimeLimit", "NextSelect", "TaskLink", "TaskLinkDetails", "CallMode", "CallRecipient", "CorrectOption", "Reward", "Result", "Route", "TimingChange", "AppliedUI", "UIDetails", "Seq" }, null, null, null, null) + })); + } + #endregion + +} +#region Messages +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class RoomTemplateResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoomTemplateResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::RoomReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomTemplateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomTemplateResponse(RoomTemplateResponse other) : this() { + id_ = other.id_; + templateName_ = other.templateName_; + companyId_ = other.companyId_; + sceneId_ = other.sceneId_; + subjectId_ = other.subjectId_; + status_ = other.status_; + isTemplate_ = other.isTemplate_; + createBy_ = other.createBy_; + createTime_ = other.createTime_; + updateBy_ = other.updateBy_; + updateTime_ = other.updateTime_; + remark_ = other.remark_; + mode_ = other.mode_; + disasterLocation_ = other.disasterLocation_; + firewall_ = other.firewall_; + taskOrmData_ = other.taskOrmData_.Clone(); + selectOrmData_ = other.selectOrmData_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoomTemplateResponse Clone() { + return new RoomTemplateResponse(this); + } + + /// Field number for the "Id" field. + public const int IdFieldNumber = 1; + private long id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "TemplateName" field. + public const int TemplateNameFieldNumber = 2; + private string templateName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TemplateName { + get { return templateName_; } + set { + templateName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "CompanyId" field. + public const int CompanyIdFieldNumber = 3; + private string companyId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CompanyId { + get { return companyId_; } + set { + companyId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "SceneId" field. + public const int SceneIdFieldNumber = 4; + private string sceneId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SceneId { + get { return sceneId_; } + set { + sceneId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "SubjectId" field. + public const int SubjectIdFieldNumber = 5; + private string subjectId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SubjectId { + get { return subjectId_; } + set { + subjectId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Status" field. + public const int StatusFieldNumber = 6; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "IsTemplate" field. + public const int IsTemplateFieldNumber = 7; + private string isTemplate_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IsTemplate { + get { return isTemplate_; } + set { + isTemplate_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "CreateBy" field. + public const int CreateByFieldNumber = 8; + private string createBy_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CreateBy { + get { return createBy_; } + set { + createBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "CreateTime" field. + public const int CreateTimeFieldNumber = 9; + private string createTime_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CreateTime { + get { return createTime_; } + set { + createTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "UpdateBy" field. + public const int UpdateByFieldNumber = 10; + private string updateBy_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UpdateBy { + get { return updateBy_; } + set { + updateBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "UpdateTime" field. + public const int UpdateTimeFieldNumber = 11; + private string updateTime_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UpdateTime { + get { return updateTime_; } + set { + updateTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Remark" field. + public const int RemarkFieldNumber = 12; + private string remark_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Remark { + get { return remark_; } + set { + remark_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Mode" field. + public const int ModeFieldNumber = 13; + private string mode_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Mode { + get { return mode_; } + set { + mode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "DisasterLocation" field. + public const int DisasterLocationFieldNumber = 14; + private string disasterLocation_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DisasterLocation { + get { return disasterLocation_; } + set { + disasterLocation_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Firewall" field. + public const int FirewallFieldNumber = 15; + private string firewall_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Firewall { + get { return firewall_; } + set { + firewall_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "taskOrmData" field. + public const int TaskOrmDataFieldNumber = 16; + private static readonly pb::FieldCodec _repeated_taskOrmData_codec + = pb::FieldCodec.ForMessage(130, global::TaskOrmData.Parser); + private readonly pbc::RepeatedField taskOrmData_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TaskOrmData { + get { return taskOrmData_; } + } + + /// Field number for the "selectOrmData" field. + public const int SelectOrmDataFieldNumber = 17; + private static readonly pb::FieldCodec _repeated_selectOrmData_codec + = pb::FieldCodec.ForMessage(138, global::SelectOrmData.Parser); + private readonly pbc::RepeatedField selectOrmData_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SelectOrmData { + get { return selectOrmData_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RoomTemplateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoomTemplateResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (TemplateName != other.TemplateName) return false; + if (CompanyId != other.CompanyId) return false; + if (SceneId != other.SceneId) return false; + if (SubjectId != other.SubjectId) return false; + if (Status != other.Status) return false; + if (IsTemplate != other.IsTemplate) return false; + if (CreateBy != other.CreateBy) return false; + if (CreateTime != other.CreateTime) return false; + if (UpdateBy != other.UpdateBy) return false; + if (UpdateTime != other.UpdateTime) return false; + if (Remark != other.Remark) return false; + if (Mode != other.Mode) return false; + if (DisasterLocation != other.DisasterLocation) return false; + if (Firewall != other.Firewall) return false; + if(!taskOrmData_.Equals(other.taskOrmData_)) return false; + if(!selectOrmData_.Equals(other.selectOrmData_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0L) hash ^= Id.GetHashCode(); + if (TemplateName.Length != 0) hash ^= TemplateName.GetHashCode(); + if (CompanyId.Length != 0) hash ^= CompanyId.GetHashCode(); + if (SceneId.Length != 0) hash ^= SceneId.GetHashCode(); + if (SubjectId.Length != 0) hash ^= SubjectId.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (IsTemplate.Length != 0) hash ^= IsTemplate.GetHashCode(); + if (CreateBy.Length != 0) hash ^= CreateBy.GetHashCode(); + if (CreateTime.Length != 0) hash ^= CreateTime.GetHashCode(); + if (UpdateBy.Length != 0) hash ^= UpdateBy.GetHashCode(); + if (UpdateTime.Length != 0) hash ^= UpdateTime.GetHashCode(); + if (Remark.Length != 0) hash ^= Remark.GetHashCode(); + if (Mode.Length != 0) hash ^= Mode.GetHashCode(); + if (DisasterLocation.Length != 0) hash ^= DisasterLocation.GetHashCode(); + if (Firewall.Length != 0) hash ^= Firewall.GetHashCode(); + hash ^= taskOrmData_.GetHashCode(); + hash ^= selectOrmData_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (TemplateName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TemplateName); + } + if (CompanyId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(CompanyId); + } + if (SceneId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(SceneId); + } + if (SubjectId.Length != 0) { + output.WriteRawTag(42); + output.WriteString(SubjectId); + } + if (Status.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Status); + } + if (IsTemplate.Length != 0) { + output.WriteRawTag(58); + output.WriteString(IsTemplate); + } + if (CreateBy.Length != 0) { + output.WriteRawTag(66); + output.WriteString(CreateBy); + } + if (CreateTime.Length != 0) { + output.WriteRawTag(74); + output.WriteString(CreateTime); + } + if (UpdateBy.Length != 0) { + output.WriteRawTag(82); + output.WriteString(UpdateBy); + } + if (UpdateTime.Length != 0) { + output.WriteRawTag(90); + output.WriteString(UpdateTime); + } + if (Remark.Length != 0) { + output.WriteRawTag(98); + output.WriteString(Remark); + } + if (Mode.Length != 0) { + output.WriteRawTag(106); + output.WriteString(Mode); + } + if (DisasterLocation.Length != 0) { + output.WriteRawTag(114); + output.WriteString(DisasterLocation); + } + if (Firewall.Length != 0) { + output.WriteRawTag(122); + output.WriteString(Firewall); + } + taskOrmData_.WriteTo(output, _repeated_taskOrmData_codec); + selectOrmData_.WriteTo(output, _repeated_selectOrmData_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (TemplateName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TemplateName); + } + if (CompanyId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(CompanyId); + } + if (SceneId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(SceneId); + } + if (SubjectId.Length != 0) { + output.WriteRawTag(42); + output.WriteString(SubjectId); + } + if (Status.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Status); + } + if (IsTemplate.Length != 0) { + output.WriteRawTag(58); + output.WriteString(IsTemplate); + } + if (CreateBy.Length != 0) { + output.WriteRawTag(66); + output.WriteString(CreateBy); + } + if (CreateTime.Length != 0) { + output.WriteRawTag(74); + output.WriteString(CreateTime); + } + if (UpdateBy.Length != 0) { + output.WriteRawTag(82); + output.WriteString(UpdateBy); + } + if (UpdateTime.Length != 0) { + output.WriteRawTag(90); + output.WriteString(UpdateTime); + } + if (Remark.Length != 0) { + output.WriteRawTag(98); + output.WriteString(Remark); + } + if (Mode.Length != 0) { + output.WriteRawTag(106); + output.WriteString(Mode); + } + if (DisasterLocation.Length != 0) { + output.WriteRawTag(114); + output.WriteString(DisasterLocation); + } + if (Firewall.Length != 0) { + output.WriteRawTag(122); + output.WriteString(Firewall); + } + taskOrmData_.WriteTo(ref output, _repeated_taskOrmData_codec); + selectOrmData_.WriteTo(ref output, _repeated_selectOrmData_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id); + } + if (TemplateName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TemplateName); + } + if (CompanyId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CompanyId); + } + if (SceneId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SceneId); + } + if (SubjectId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SubjectId); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (IsTemplate.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IsTemplate); + } + if (CreateBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CreateBy); + } + if (CreateTime.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CreateTime); + } + if (UpdateBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UpdateBy); + } + if (UpdateTime.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UpdateTime); + } + if (Remark.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Remark); + } + if (Mode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Mode); + } + if (DisasterLocation.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DisasterLocation); + } + if (Firewall.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Firewall); + } + size += taskOrmData_.CalculateSize(_repeated_taskOrmData_codec); + size += selectOrmData_.CalculateSize(_repeated_selectOrmData_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoomTemplateResponse other) { + if (other == null) { + return; + } + if (other.Id != 0L) { + Id = other.Id; + } + if (other.TemplateName.Length != 0) { + TemplateName = other.TemplateName; + } + if (other.CompanyId.Length != 0) { + CompanyId = other.CompanyId; + } + if (other.SceneId.Length != 0) { + SceneId = other.SceneId; + } + if (other.SubjectId.Length != 0) { + SubjectId = other.SubjectId; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + if (other.IsTemplate.Length != 0) { + IsTemplate = other.IsTemplate; + } + if (other.CreateBy.Length != 0) { + CreateBy = other.CreateBy; + } + if (other.CreateTime.Length != 0) { + CreateTime = other.CreateTime; + } + if (other.UpdateBy.Length != 0) { + UpdateBy = other.UpdateBy; + } + if (other.UpdateTime.Length != 0) { + UpdateTime = other.UpdateTime; + } + if (other.Remark.Length != 0) { + Remark = other.Remark; + } + if (other.Mode.Length != 0) { + Mode = other.Mode; + } + if (other.DisasterLocation.Length != 0) { + DisasterLocation = other.DisasterLocation; + } + if (other.Firewall.Length != 0) { + Firewall = other.Firewall; + } + taskOrmData_.Add(other.taskOrmData_); + selectOrmData_.Add(other.selectOrmData_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 18: { + TemplateName = input.ReadString(); + break; + } + case 26: { + CompanyId = input.ReadString(); + break; + } + case 34: { + SceneId = input.ReadString(); + break; + } + case 42: { + SubjectId = input.ReadString(); + break; + } + case 50: { + Status = input.ReadString(); + break; + } + case 58: { + IsTemplate = input.ReadString(); + break; + } + case 66: { + CreateBy = input.ReadString(); + break; + } + case 74: { + CreateTime = input.ReadString(); + break; + } + case 82: { + UpdateBy = input.ReadString(); + break; + } + case 90: { + UpdateTime = input.ReadString(); + break; + } + case 98: { + Remark = input.ReadString(); + break; + } + case 106: { + Mode = input.ReadString(); + break; + } + case 114: { + DisasterLocation = input.ReadString(); + break; + } + case 122: { + Firewall = input.ReadString(); + break; + } + case 130: { + taskOrmData_.AddEntriesFrom(input, _repeated_taskOrmData_codec); + break; + } + case 138: { + selectOrmData_.AddEntriesFrom(input, _repeated_selectOrmData_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 18: { + TemplateName = input.ReadString(); + break; + } + case 26: { + CompanyId = input.ReadString(); + break; + } + case 34: { + SceneId = input.ReadString(); + break; + } + case 42: { + SubjectId = input.ReadString(); + break; + } + case 50: { + Status = input.ReadString(); + break; + } + case 58: { + IsTemplate = input.ReadString(); + break; + } + case 66: { + CreateBy = input.ReadString(); + break; + } + case 74: { + CreateTime = input.ReadString(); + break; + } + case 82: { + UpdateBy = input.ReadString(); + break; + } + case 90: { + UpdateTime = input.ReadString(); + break; + } + case 98: { + Remark = input.ReadString(); + break; + } + case 106: { + Mode = input.ReadString(); + break; + } + case 114: { + DisasterLocation = input.ReadString(); + break; + } + case 122: { + Firewall = input.ReadString(); + break; + } + case 130: { + taskOrmData_.AddEntriesFrom(ref input, _repeated_taskOrmData_codec); + break; + } + case 138: { + selectOrmData_.AddEntriesFrom(ref input, _repeated_selectOrmData_codec); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class TaskOrmData : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskOrmData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::RoomReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskOrmData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskOrmData(TaskOrmData other) : this() { + id_ = other.id_; + taskName_ = other.taskName_; + gameName_ = other.gameName_; + gameType_ = other.gameType_; + gameDesc_ = other.gameDesc_; + gamePlayScript_ = other.gamePlayScript_; + gameTrigger_ = other.gameTrigger_; + gameTriggerLogic_ = other.gameTriggerLogic_; + gameOverseeCond_ = other.gameOverseeCond_; + gameTimeLimit_ = other.gameTimeLimit_; + gameRole_ = other.gameRole_; + gameSelects_ = other.gameSelects_; + gameTargetType_ = other.gameTargetType_; + gameTargetsFirst_ = other.gameTargetsFirst_; + gameTargetsSecond_ = other.gameTargetsSecond_; + gameTargetsSecondLogic_ = other.gameTargetsSecondLogic_; + gameExtraValue_ = other.gameExtraValue_; + gameSort_ = other.gameSort_; + gameIsShow_ = other.gameIsShow_; + gameExclusive_ = other.gameExclusive_; + gameReward_ = other.gameReward_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskOrmData Clone() { + return new TaskOrmData(this); + } + + /// Field number for the "Id" field. + public const int IdFieldNumber = 1; + private long id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "TaskName" field. + public const int TaskNameFieldNumber = 2; + private string taskName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TaskName { + get { return taskName_; } + set { + taskName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameName" field. + public const int GameNameFieldNumber = 3; + private string gameName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameName { + get { return gameName_; } + set { + gameName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameType" field. + public const int GameTypeFieldNumber = 4; + private int gameType_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int GameType { + get { return gameType_; } + set { + gameType_ = value; + } + } + + /// Field number for the "GameDesc" field. + public const int GameDescFieldNumber = 5; + private string gameDesc_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameDesc { + get { return gameDesc_; } + set { + gameDesc_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GamePlayScript" field. + public const int GamePlayScriptFieldNumber = 6; + private string gamePlayScript_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GamePlayScript { + get { return gamePlayScript_; } + set { + gamePlayScript_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameTrigger" field. + public const int GameTriggerFieldNumber = 7; + private string gameTrigger_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameTrigger { + get { return gameTrigger_; } + set { + gameTrigger_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameTriggerLogic" field. + public const int GameTriggerLogicFieldNumber = 8; + private string gameTriggerLogic_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameTriggerLogic { + get { return gameTriggerLogic_; } + set { + gameTriggerLogic_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameOverseeCond" field. + public const int GameOverseeCondFieldNumber = 9; + private string gameOverseeCond_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameOverseeCond { + get { return gameOverseeCond_; } + set { + gameOverseeCond_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameTimeLimit" field. + public const int GameTimeLimitFieldNumber = 10; + private string gameTimeLimit_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameTimeLimit { + get { return gameTimeLimit_; } + set { + gameTimeLimit_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameRole" field. + public const int GameRoleFieldNumber = 11; + private string gameRole_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameRole { + get { return gameRole_; } + set { + gameRole_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameSelects" field. + public const int GameSelectsFieldNumber = 12; + private string gameSelects_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameSelects { + get { return gameSelects_; } + set { + gameSelects_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameTargetType" field. + public const int GameTargetTypeFieldNumber = 13; + private string gameTargetType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameTargetType { + get { return gameTargetType_; } + set { + gameTargetType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameTargetsFirst" field. + public const int GameTargetsFirstFieldNumber = 14; + private string gameTargetsFirst_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameTargetsFirst { + get { return gameTargetsFirst_; } + set { + gameTargetsFirst_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameTargetsSecond" field. + public const int GameTargetsSecondFieldNumber = 15; + private string gameTargetsSecond_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameTargetsSecond { + get { return gameTargetsSecond_; } + set { + gameTargetsSecond_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameTargetsSecondLogic" field. + public const int GameTargetsSecondLogicFieldNumber = 16; + private string gameTargetsSecondLogic_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameTargetsSecondLogic { + get { return gameTargetsSecondLogic_; } + set { + gameTargetsSecondLogic_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameExtraValue" field. + public const int GameExtraValueFieldNumber = 17; + private string gameExtraValue_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameExtraValue { + get { return gameExtraValue_; } + set { + gameExtraValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameSort" field. + public const int GameSortFieldNumber = 18; + private string gameSort_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameSort { + get { return gameSort_; } + set { + gameSort_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameIsShow" field. + public const int GameIsShowFieldNumber = 19; + private string gameIsShow_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameIsShow { + get { return gameIsShow_; } + set { + gameIsShow_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameExclusive" field. + public const int GameExclusiveFieldNumber = 20; + private string gameExclusive_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameExclusive { + get { return gameExclusive_; } + set { + gameExclusive_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "GameReward" field. + public const int GameRewardFieldNumber = 21; + private string gameReward_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GameReward { + get { return gameReward_; } + set { + gameReward_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskOrmData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskOrmData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (TaskName != other.TaskName) return false; + if (GameName != other.GameName) return false; + if (GameType != other.GameType) return false; + if (GameDesc != other.GameDesc) return false; + if (GamePlayScript != other.GamePlayScript) return false; + if (GameTrigger != other.GameTrigger) return false; + if (GameTriggerLogic != other.GameTriggerLogic) return false; + if (GameOverseeCond != other.GameOverseeCond) return false; + if (GameTimeLimit != other.GameTimeLimit) return false; + if (GameRole != other.GameRole) return false; + if (GameSelects != other.GameSelects) return false; + if (GameTargetType != other.GameTargetType) return false; + if (GameTargetsFirst != other.GameTargetsFirst) return false; + if (GameTargetsSecond != other.GameTargetsSecond) return false; + if (GameTargetsSecondLogic != other.GameTargetsSecondLogic) return false; + if (GameExtraValue != other.GameExtraValue) return false; + if (GameSort != other.GameSort) return false; + if (GameIsShow != other.GameIsShow) return false; + if (GameExclusive != other.GameExclusive) return false; + if (GameReward != other.GameReward) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0L) hash ^= Id.GetHashCode(); + if (TaskName.Length != 0) hash ^= TaskName.GetHashCode(); + if (GameName.Length != 0) hash ^= GameName.GetHashCode(); + if (GameType != 0) hash ^= GameType.GetHashCode(); + if (GameDesc.Length != 0) hash ^= GameDesc.GetHashCode(); + if (GamePlayScript.Length != 0) hash ^= GamePlayScript.GetHashCode(); + if (GameTrigger.Length != 0) hash ^= GameTrigger.GetHashCode(); + if (GameTriggerLogic.Length != 0) hash ^= GameTriggerLogic.GetHashCode(); + if (GameOverseeCond.Length != 0) hash ^= GameOverseeCond.GetHashCode(); + if (GameTimeLimit.Length != 0) hash ^= GameTimeLimit.GetHashCode(); + if (GameRole.Length != 0) hash ^= GameRole.GetHashCode(); + if (GameSelects.Length != 0) hash ^= GameSelects.GetHashCode(); + if (GameTargetType.Length != 0) hash ^= GameTargetType.GetHashCode(); + if (GameTargetsFirst.Length != 0) hash ^= GameTargetsFirst.GetHashCode(); + if (GameTargetsSecond.Length != 0) hash ^= GameTargetsSecond.GetHashCode(); + if (GameTargetsSecondLogic.Length != 0) hash ^= GameTargetsSecondLogic.GetHashCode(); + if (GameExtraValue.Length != 0) hash ^= GameExtraValue.GetHashCode(); + if (GameSort.Length != 0) hash ^= GameSort.GetHashCode(); + if (GameIsShow.Length != 0) hash ^= GameIsShow.GetHashCode(); + if (GameExclusive.Length != 0) hash ^= GameExclusive.GetHashCode(); + if (GameReward.Length != 0) hash ^= GameReward.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (TaskName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TaskName); + } + if (GameName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(GameName); + } + if (GameType != 0) { + output.WriteRawTag(32); + output.WriteInt32(GameType); + } + if (GameDesc.Length != 0) { + output.WriteRawTag(42); + output.WriteString(GameDesc); + } + if (GamePlayScript.Length != 0) { + output.WriteRawTag(50); + output.WriteString(GamePlayScript); + } + if (GameTrigger.Length != 0) { + output.WriteRawTag(58); + output.WriteString(GameTrigger); + } + if (GameTriggerLogic.Length != 0) { + output.WriteRawTag(66); + output.WriteString(GameTriggerLogic); + } + if (GameOverseeCond.Length != 0) { + output.WriteRawTag(74); + output.WriteString(GameOverseeCond); + } + if (GameTimeLimit.Length != 0) { + output.WriteRawTag(82); + output.WriteString(GameTimeLimit); + } + if (GameRole.Length != 0) { + output.WriteRawTag(90); + output.WriteString(GameRole); + } + if (GameSelects.Length != 0) { + output.WriteRawTag(98); + output.WriteString(GameSelects); + } + if (GameTargetType.Length != 0) { + output.WriteRawTag(106); + output.WriteString(GameTargetType); + } + if (GameTargetsFirst.Length != 0) { + output.WriteRawTag(114); + output.WriteString(GameTargetsFirst); + } + if (GameTargetsSecond.Length != 0) { + output.WriteRawTag(122); + output.WriteString(GameTargetsSecond); + } + if (GameTargetsSecondLogic.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(GameTargetsSecondLogic); + } + if (GameExtraValue.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(GameExtraValue); + } + if (GameSort.Length != 0) { + output.WriteRawTag(146, 1); + output.WriteString(GameSort); + } + if (GameIsShow.Length != 0) { + output.WriteRawTag(154, 1); + output.WriteString(GameIsShow); + } + if (GameExclusive.Length != 0) { + output.WriteRawTag(162, 1); + output.WriteString(GameExclusive); + } + if (GameReward.Length != 0) { + output.WriteRawTag(170, 1); + output.WriteString(GameReward); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (TaskName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TaskName); + } + if (GameName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(GameName); + } + if (GameType != 0) { + output.WriteRawTag(32); + output.WriteInt32(GameType); + } + if (GameDesc.Length != 0) { + output.WriteRawTag(42); + output.WriteString(GameDesc); + } + if (GamePlayScript.Length != 0) { + output.WriteRawTag(50); + output.WriteString(GamePlayScript); + } + if (GameTrigger.Length != 0) { + output.WriteRawTag(58); + output.WriteString(GameTrigger); + } + if (GameTriggerLogic.Length != 0) { + output.WriteRawTag(66); + output.WriteString(GameTriggerLogic); + } + if (GameOverseeCond.Length != 0) { + output.WriteRawTag(74); + output.WriteString(GameOverseeCond); + } + if (GameTimeLimit.Length != 0) { + output.WriteRawTag(82); + output.WriteString(GameTimeLimit); + } + if (GameRole.Length != 0) { + output.WriteRawTag(90); + output.WriteString(GameRole); + } + if (GameSelects.Length != 0) { + output.WriteRawTag(98); + output.WriteString(GameSelects); + } + if (GameTargetType.Length != 0) { + output.WriteRawTag(106); + output.WriteString(GameTargetType); + } + if (GameTargetsFirst.Length != 0) { + output.WriteRawTag(114); + output.WriteString(GameTargetsFirst); + } + if (GameTargetsSecond.Length != 0) { + output.WriteRawTag(122); + output.WriteString(GameTargetsSecond); + } + if (GameTargetsSecondLogic.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(GameTargetsSecondLogic); + } + if (GameExtraValue.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(GameExtraValue); + } + if (GameSort.Length != 0) { + output.WriteRawTag(146, 1); + output.WriteString(GameSort); + } + if (GameIsShow.Length != 0) { + output.WriteRawTag(154, 1); + output.WriteString(GameIsShow); + } + if (GameExclusive.Length != 0) { + output.WriteRawTag(162, 1); + output.WriteString(GameExclusive); + } + if (GameReward.Length != 0) { + output.WriteRawTag(170, 1); + output.WriteString(GameReward); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id); + } + if (TaskName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TaskName); + } + if (GameName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameName); + } + if (GameType != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(GameType); + } + if (GameDesc.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameDesc); + } + if (GamePlayScript.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GamePlayScript); + } + if (GameTrigger.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameTrigger); + } + if (GameTriggerLogic.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameTriggerLogic); + } + if (GameOverseeCond.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameOverseeCond); + } + if (GameTimeLimit.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameTimeLimit); + } + if (GameRole.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameRole); + } + if (GameSelects.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameSelects); + } + if (GameTargetType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameTargetType); + } + if (GameTargetsFirst.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameTargetsFirst); + } + if (GameTargetsSecond.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GameTargetsSecond); + } + if (GameTargetsSecondLogic.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(GameTargetsSecondLogic); + } + if (GameExtraValue.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(GameExtraValue); + } + if (GameSort.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(GameSort); + } + if (GameIsShow.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(GameIsShow); + } + if (GameExclusive.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(GameExclusive); + } + if (GameReward.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(GameReward); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskOrmData other) { + if (other == null) { + return; + } + if (other.Id != 0L) { + Id = other.Id; + } + if (other.TaskName.Length != 0) { + TaskName = other.TaskName; + } + if (other.GameName.Length != 0) { + GameName = other.GameName; + } + if (other.GameType != 0) { + GameType = other.GameType; + } + if (other.GameDesc.Length != 0) { + GameDesc = other.GameDesc; + } + if (other.GamePlayScript.Length != 0) { + GamePlayScript = other.GamePlayScript; + } + if (other.GameTrigger.Length != 0) { + GameTrigger = other.GameTrigger; + } + if (other.GameTriggerLogic.Length != 0) { + GameTriggerLogic = other.GameTriggerLogic; + } + if (other.GameOverseeCond.Length != 0) { + GameOverseeCond = other.GameOverseeCond; + } + if (other.GameTimeLimit.Length != 0) { + GameTimeLimit = other.GameTimeLimit; + } + if (other.GameRole.Length != 0) { + GameRole = other.GameRole; + } + if (other.GameSelects.Length != 0) { + GameSelects = other.GameSelects; + } + if (other.GameTargetType.Length != 0) { + GameTargetType = other.GameTargetType; + } + if (other.GameTargetsFirst.Length != 0) { + GameTargetsFirst = other.GameTargetsFirst; + } + if (other.GameTargetsSecond.Length != 0) { + GameTargetsSecond = other.GameTargetsSecond; + } + if (other.GameTargetsSecondLogic.Length != 0) { + GameTargetsSecondLogic = other.GameTargetsSecondLogic; + } + if (other.GameExtraValue.Length != 0) { + GameExtraValue = other.GameExtraValue; + } + if (other.GameSort.Length != 0) { + GameSort = other.GameSort; + } + if (other.GameIsShow.Length != 0) { + GameIsShow = other.GameIsShow; + } + if (other.GameExclusive.Length != 0) { + GameExclusive = other.GameExclusive; + } + if (other.GameReward.Length != 0) { + GameReward = other.GameReward; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 18: { + TaskName = input.ReadString(); + break; + } + case 26: { + GameName = input.ReadString(); + break; + } + case 32: { + GameType = input.ReadInt32(); + break; + } + case 42: { + GameDesc = input.ReadString(); + break; + } + case 50: { + GamePlayScript = input.ReadString(); + break; + } + case 58: { + GameTrigger = input.ReadString(); + break; + } + case 66: { + GameTriggerLogic = input.ReadString(); + break; + } + case 74: { + GameOverseeCond = input.ReadString(); + break; + } + case 82: { + GameTimeLimit = input.ReadString(); + break; + } + case 90: { + GameRole = input.ReadString(); + break; + } + case 98: { + GameSelects = input.ReadString(); + break; + } + case 106: { + GameTargetType = input.ReadString(); + break; + } + case 114: { + GameTargetsFirst = input.ReadString(); + break; + } + case 122: { + GameTargetsSecond = input.ReadString(); + break; + } + case 130: { + GameTargetsSecondLogic = input.ReadString(); + break; + } + case 138: { + GameExtraValue = input.ReadString(); + break; + } + case 146: { + GameSort = input.ReadString(); + break; + } + case 154: { + GameIsShow = input.ReadString(); + break; + } + case 162: { + GameExclusive = input.ReadString(); + break; + } + case 170: { + GameReward = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 18: { + TaskName = input.ReadString(); + break; + } + case 26: { + GameName = input.ReadString(); + break; + } + case 32: { + GameType = input.ReadInt32(); + break; + } + case 42: { + GameDesc = input.ReadString(); + break; + } + case 50: { + GamePlayScript = input.ReadString(); + break; + } + case 58: { + GameTrigger = input.ReadString(); + break; + } + case 66: { + GameTriggerLogic = input.ReadString(); + break; + } + case 74: { + GameOverseeCond = input.ReadString(); + break; + } + case 82: { + GameTimeLimit = input.ReadString(); + break; + } + case 90: { + GameRole = input.ReadString(); + break; + } + case 98: { + GameSelects = input.ReadString(); + break; + } + case 106: { + GameTargetType = input.ReadString(); + break; + } + case 114: { + GameTargetsFirst = input.ReadString(); + break; + } + case 122: { + GameTargetsSecond = input.ReadString(); + break; + } + case 130: { + GameTargetsSecondLogic = input.ReadString(); + break; + } + case 138: { + GameExtraValue = input.ReadString(); + break; + } + case 146: { + GameSort = input.ReadString(); + break; + } + case 154: { + GameIsShow = input.ReadString(); + break; + } + case 162: { + GameExclusive = input.ReadString(); + break; + } + case 170: { + GameReward = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class SelectOrmData : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SelectOrmData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::RoomReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SelectOrmData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SelectOrmData(SelectOrmData other) : this() { + id_ = other.id_; + note_ = other.note_; + group_ = other.group_; + showText_ = other.showText_; + icon_ = other.icon_; + preconditions_ = other.preconditions_; + exclusive_ = other.exclusive_; + taskTime_ = other.taskTime_; + timeLimit_ = other.timeLimit_; + nextSelect_ = other.nextSelect_; + taskLink_ = other.taskLink_; + taskLinkDetails_ = other.taskLinkDetails_; + callMode_ = other.callMode_; + callRecipient_ = other.callRecipient_; + correctOption_ = other.correctOption_; + reward_ = other.reward_; + result_ = other.result_; + route_ = other.route_; + timingChange_ = other.timingChange_; + appliedUI_ = other.appliedUI_; + uIDetails_ = other.uIDetails_; + seq_ = other.seq_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SelectOrmData Clone() { + return new SelectOrmData(this); + } + + /// Field number for the "Id" field. + public const int IdFieldNumber = 1; + private long id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "Note" field. + public const int NoteFieldNumber = 2; + private string note_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Note { + get { return note_; } + set { + note_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Group" field. + public const int GroupFieldNumber = 3; + private string group_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Group { + get { return group_; } + set { + group_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ShowText" field. + public const int ShowTextFieldNumber = 4; + private string showText_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ShowText { + get { return showText_; } + set { + showText_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Icon" field. + public const int IconFieldNumber = 5; + private string icon_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Icon { + get { return icon_; } + set { + icon_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Preconditions" field. + public const int PreconditionsFieldNumber = 6; + private string preconditions_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Preconditions { + get { return preconditions_; } + set { + preconditions_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Exclusive" field. + public const int ExclusiveFieldNumber = 7; + private string exclusive_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Exclusive { + get { return exclusive_; } + set { + exclusive_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TaskTime" field. + public const int TaskTimeFieldNumber = 8; + private long taskTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TaskTime { + get { return taskTime_; } + set { + taskTime_ = value; + } + } + + /// Field number for the "TimeLimit" field. + public const int TimeLimitFieldNumber = 9; + private long timeLimit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TimeLimit { + get { return timeLimit_; } + set { + timeLimit_ = value; + } + } + + /// Field number for the "NextSelect" field. + public const int NextSelectFieldNumber = 10; + private string nextSelect_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextSelect { + get { return nextSelect_; } + set { + nextSelect_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TaskLink" field. + public const int TaskLinkFieldNumber = 11; + private string taskLink_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TaskLink { + get { return taskLink_; } + set { + taskLink_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TaskLinkDetails" field. + public const int TaskLinkDetailsFieldNumber = 12; + private string taskLinkDetails_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TaskLinkDetails { + get { return taskLinkDetails_; } + set { + taskLinkDetails_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "CallMode" field. + public const int CallModeFieldNumber = 13; + private string callMode_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CallMode { + get { return callMode_; } + set { + callMode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "CallRecipient" field. + public const int CallRecipientFieldNumber = 14; + private string callRecipient_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CallRecipient { + get { return callRecipient_; } + set { + callRecipient_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "CorrectOption" field. + public const int CorrectOptionFieldNumber = 15; + private string correctOption_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CorrectOption { + get { return correctOption_; } + set { + correctOption_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Reward" field. + public const int RewardFieldNumber = 16; + private string reward_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Reward { + get { return reward_; } + set { + reward_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Result" field. + public const int ResultFieldNumber = 17; + private string result_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Result { + get { return result_; } + set { + result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Route" field. + public const int RouteFieldNumber = 18; + private string route_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Route { + get { return route_; } + set { + route_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TimingChange" field. + public const int TimingChangeFieldNumber = 19; + private string timingChange_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TimingChange { + get { return timingChange_; } + set { + timingChange_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "AppliedUI" field. + public const int AppliedUIFieldNumber = 20; + private string appliedUI_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string AppliedUI { + get { return appliedUI_; } + set { + appliedUI_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "UIDetails" field. + public const int UIDetailsFieldNumber = 21; + private string uIDetails_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UIDetails { + get { return uIDetails_; } + set { + uIDetails_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Seq" field. + public const int SeqFieldNumber = 22; + private string seq_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Seq { + get { return seq_; } + set { + seq_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SelectOrmData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SelectOrmData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Note != other.Note) return false; + if (Group != other.Group) return false; + if (ShowText != other.ShowText) return false; + if (Icon != other.Icon) return false; + if (Preconditions != other.Preconditions) return false; + if (Exclusive != other.Exclusive) return false; + if (TaskTime != other.TaskTime) return false; + if (TimeLimit != other.TimeLimit) return false; + if (NextSelect != other.NextSelect) return false; + if (TaskLink != other.TaskLink) return false; + if (TaskLinkDetails != other.TaskLinkDetails) return false; + if (CallMode != other.CallMode) return false; + if (CallRecipient != other.CallRecipient) return false; + if (CorrectOption != other.CorrectOption) return false; + if (Reward != other.Reward) return false; + if (Result != other.Result) return false; + if (Route != other.Route) return false; + if (TimingChange != other.TimingChange) return false; + if (AppliedUI != other.AppliedUI) return false; + if (UIDetails != other.UIDetails) return false; + if (Seq != other.Seq) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0L) hash ^= Id.GetHashCode(); + if (Note.Length != 0) hash ^= Note.GetHashCode(); + if (Group.Length != 0) hash ^= Group.GetHashCode(); + if (ShowText.Length != 0) hash ^= ShowText.GetHashCode(); + if (Icon.Length != 0) hash ^= Icon.GetHashCode(); + if (Preconditions.Length != 0) hash ^= Preconditions.GetHashCode(); + if (Exclusive.Length != 0) hash ^= Exclusive.GetHashCode(); + if (TaskTime != 0L) hash ^= TaskTime.GetHashCode(); + if (TimeLimit != 0L) hash ^= TimeLimit.GetHashCode(); + if (NextSelect.Length != 0) hash ^= NextSelect.GetHashCode(); + if (TaskLink.Length != 0) hash ^= TaskLink.GetHashCode(); + if (TaskLinkDetails.Length != 0) hash ^= TaskLinkDetails.GetHashCode(); + if (CallMode.Length != 0) hash ^= CallMode.GetHashCode(); + if (CallRecipient.Length != 0) hash ^= CallRecipient.GetHashCode(); + if (CorrectOption.Length != 0) hash ^= CorrectOption.GetHashCode(); + if (Reward.Length != 0) hash ^= Reward.GetHashCode(); + if (Result.Length != 0) hash ^= Result.GetHashCode(); + if (Route.Length != 0) hash ^= Route.GetHashCode(); + if (TimingChange.Length != 0) hash ^= TimingChange.GetHashCode(); + if (AppliedUI.Length != 0) hash ^= AppliedUI.GetHashCode(); + if (UIDetails.Length != 0) hash ^= UIDetails.GetHashCode(); + if (Seq.Length != 0) hash ^= Seq.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (Note.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Note); + } + if (Group.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Group); + } + if (ShowText.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ShowText); + } + if (Icon.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Icon); + } + if (Preconditions.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Preconditions); + } + if (Exclusive.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Exclusive); + } + if (TaskTime != 0L) { + output.WriteRawTag(64); + output.WriteInt64(TaskTime); + } + if (TimeLimit != 0L) { + output.WriteRawTag(72); + output.WriteInt64(TimeLimit); + } + if (NextSelect.Length != 0) { + output.WriteRawTag(82); + output.WriteString(NextSelect); + } + if (TaskLink.Length != 0) { + output.WriteRawTag(90); + output.WriteString(TaskLink); + } + if (TaskLinkDetails.Length != 0) { + output.WriteRawTag(98); + output.WriteString(TaskLinkDetails); + } + if (CallMode.Length != 0) { + output.WriteRawTag(106); + output.WriteString(CallMode); + } + if (CallRecipient.Length != 0) { + output.WriteRawTag(114); + output.WriteString(CallRecipient); + } + if (CorrectOption.Length != 0) { + output.WriteRawTag(122); + output.WriteString(CorrectOption); + } + if (Reward.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(Reward); + } + if (Result.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(Result); + } + if (Route.Length != 0) { + output.WriteRawTag(146, 1); + output.WriteString(Route); + } + if (TimingChange.Length != 0) { + output.WriteRawTag(154, 1); + output.WriteString(TimingChange); + } + if (AppliedUI.Length != 0) { + output.WriteRawTag(162, 1); + output.WriteString(AppliedUI); + } + if (UIDetails.Length != 0) { + output.WriteRawTag(170, 1); + output.WriteString(UIDetails); + } + if (Seq.Length != 0) { + output.WriteRawTag(178, 1); + output.WriteString(Seq); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (Note.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Note); + } + if (Group.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Group); + } + if (ShowText.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ShowText); + } + if (Icon.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Icon); + } + if (Preconditions.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Preconditions); + } + if (Exclusive.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Exclusive); + } + if (TaskTime != 0L) { + output.WriteRawTag(64); + output.WriteInt64(TaskTime); + } + if (TimeLimit != 0L) { + output.WriteRawTag(72); + output.WriteInt64(TimeLimit); + } + if (NextSelect.Length != 0) { + output.WriteRawTag(82); + output.WriteString(NextSelect); + } + if (TaskLink.Length != 0) { + output.WriteRawTag(90); + output.WriteString(TaskLink); + } + if (TaskLinkDetails.Length != 0) { + output.WriteRawTag(98); + output.WriteString(TaskLinkDetails); + } + if (CallMode.Length != 0) { + output.WriteRawTag(106); + output.WriteString(CallMode); + } + if (CallRecipient.Length != 0) { + output.WriteRawTag(114); + output.WriteString(CallRecipient); + } + if (CorrectOption.Length != 0) { + output.WriteRawTag(122); + output.WriteString(CorrectOption); + } + if (Reward.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(Reward); + } + if (Result.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(Result); + } + if (Route.Length != 0) { + output.WriteRawTag(146, 1); + output.WriteString(Route); + } + if (TimingChange.Length != 0) { + output.WriteRawTag(154, 1); + output.WriteString(TimingChange); + } + if (AppliedUI.Length != 0) { + output.WriteRawTag(162, 1); + output.WriteString(AppliedUI); + } + if (UIDetails.Length != 0) { + output.WriteRawTag(170, 1); + output.WriteString(UIDetails); + } + if (Seq.Length != 0) { + output.WriteRawTag(178, 1); + output.WriteString(Seq); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id); + } + if (Note.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Note); + } + if (Group.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Group); + } + if (ShowText.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ShowText); + } + if (Icon.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Icon); + } + if (Preconditions.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Preconditions); + } + if (Exclusive.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Exclusive); + } + if (TaskTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TaskTime); + } + if (TimeLimit != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TimeLimit); + } + if (NextSelect.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextSelect); + } + if (TaskLink.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TaskLink); + } + if (TaskLinkDetails.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TaskLinkDetails); + } + if (CallMode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CallMode); + } + if (CallRecipient.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CallRecipient); + } + if (CorrectOption.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CorrectOption); + } + if (Reward.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Reward); + } + if (Result.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Result); + } + if (Route.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Route); + } + if (TimingChange.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(TimingChange); + } + if (AppliedUI.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(AppliedUI); + } + if (UIDetails.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(UIDetails); + } + if (Seq.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Seq); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SelectOrmData other) { + if (other == null) { + return; + } + if (other.Id != 0L) { + Id = other.Id; + } + if (other.Note.Length != 0) { + Note = other.Note; + } + if (other.Group.Length != 0) { + Group = other.Group; + } + if (other.ShowText.Length != 0) { + ShowText = other.ShowText; + } + if (other.Icon.Length != 0) { + Icon = other.Icon; + } + if (other.Preconditions.Length != 0) { + Preconditions = other.Preconditions; + } + if (other.Exclusive.Length != 0) { + Exclusive = other.Exclusive; + } + if (other.TaskTime != 0L) { + TaskTime = other.TaskTime; + } + if (other.TimeLimit != 0L) { + TimeLimit = other.TimeLimit; + } + if (other.NextSelect.Length != 0) { + NextSelect = other.NextSelect; + } + if (other.TaskLink.Length != 0) { + TaskLink = other.TaskLink; + } + if (other.TaskLinkDetails.Length != 0) { + TaskLinkDetails = other.TaskLinkDetails; + } + if (other.CallMode.Length != 0) { + CallMode = other.CallMode; + } + if (other.CallRecipient.Length != 0) { + CallRecipient = other.CallRecipient; + } + if (other.CorrectOption.Length != 0) { + CorrectOption = other.CorrectOption; + } + if (other.Reward.Length != 0) { + Reward = other.Reward; + } + if (other.Result.Length != 0) { + Result = other.Result; + } + if (other.Route.Length != 0) { + Route = other.Route; + } + if (other.TimingChange.Length != 0) { + TimingChange = other.TimingChange; + } + if (other.AppliedUI.Length != 0) { + AppliedUI = other.AppliedUI; + } + if (other.UIDetails.Length != 0) { + UIDetails = other.UIDetails; + } + if (other.Seq.Length != 0) { + Seq = other.Seq; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 18: { + Note = input.ReadString(); + break; + } + case 26: { + Group = input.ReadString(); + break; + } + case 34: { + ShowText = input.ReadString(); + break; + } + case 42: { + Icon = input.ReadString(); + break; + } + case 50: { + Preconditions = input.ReadString(); + break; + } + case 58: { + Exclusive = input.ReadString(); + break; + } + case 64: { + TaskTime = input.ReadInt64(); + break; + } + case 72: { + TimeLimit = input.ReadInt64(); + break; + } + case 82: { + NextSelect = input.ReadString(); + break; + } + case 90: { + TaskLink = input.ReadString(); + break; + } + case 98: { + TaskLinkDetails = input.ReadString(); + break; + } + case 106: { + CallMode = input.ReadString(); + break; + } + case 114: { + CallRecipient = input.ReadString(); + break; + } + case 122: { + CorrectOption = input.ReadString(); + break; + } + case 130: { + Reward = input.ReadString(); + break; + } + case 138: { + Result = input.ReadString(); + break; + } + case 146: { + Route = input.ReadString(); + break; + } + case 154: { + TimingChange = input.ReadString(); + break; + } + case 162: { + AppliedUI = input.ReadString(); + break; + } + case 170: { + UIDetails = input.ReadString(); + break; + } + case 178: { + Seq = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 18: { + Note = input.ReadString(); + break; + } + case 26: { + Group = input.ReadString(); + break; + } + case 34: { + ShowText = input.ReadString(); + break; + } + case 42: { + Icon = input.ReadString(); + break; + } + case 50: { + Preconditions = input.ReadString(); + break; + } + case 58: { + Exclusive = input.ReadString(); + break; + } + case 64: { + TaskTime = input.ReadInt64(); + break; + } + case 72: { + TimeLimit = input.ReadInt64(); + break; + } + case 82: { + NextSelect = input.ReadString(); + break; + } + case 90: { + TaskLink = input.ReadString(); + break; + } + case 98: { + TaskLinkDetails = input.ReadString(); + break; + } + case 106: { + CallMode = input.ReadString(); + break; + } + case 114: { + CallRecipient = input.ReadString(); + break; + } + case 122: { + CorrectOption = input.ReadString(); + break; + } + case 130: { + Reward = input.ReadString(); + break; + } + case 138: { + Result = input.ReadString(); + break; + } + case 146: { + Route = input.ReadString(); + break; + } + case 154: { + TimingChange = input.ReadString(); + break; + } + case 162: { + AppliedUI = input.ReadString(); + break; + } + case 170: { + UIDetails = input.ReadString(); + break; + } + case 178: { + Seq = input.ReadString(); + break; + } + } + } + } + #endif + +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/Room.cs.meta b/xiaofang/Assets/comm/Proto/Room.cs.meta new file mode 100644 index 00000000..8b4ed676 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Room.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: efe7f33d728ac2948956f9a0bcf43259 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/Task.cs b/xiaofang/Assets/comm/Proto/Task.cs new file mode 100644 index 00000000..2b0e0bd6 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Task.cs @@ -0,0 +1,2826 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: task.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from task.proto +public static partial class TaskReflection { + + #region Descriptor + /// File descriptor for task.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TaskReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cgp0YXNrLnByb3RvIiMKEVRhc2tDcmVhdGVSZXF1ZXN0Eg4KBnJvb21JZBgB", + "IAEoCSIWCghCYXNlVGFzaxIKCgJJZBgBIAEoCSJvChJUYXNrQ3JlYXRlUmVz", + "cG9uc2USCgoCSWQYASABKAkSCQoBWBgCIAEoAhIJCgFZGAMgASgCEgkKAVoY", + "BCABKAISDAoEVHlwZRgFIAEoBRIOCgZSb29tSWQYBiABKAkSDgoGVXNlcklk", + "GAcgASgJIrwBChFUYXNrVXBkYXRlUmVxdWVzdBIOCgZSb29tSWQYASABKAkS", + "DgoGVGFza0lkGAIgASgJEg4KBlVzZXJJZBgDIAEoCRIQCghTZWxlY3RJZBgE", + "IAEoCRIQCghUb1VzZXJJZBgFIAEoCRIQCghVc2VyTmFtZRgGIAEoCRIOCgZQ", + "cm9wSWQYByABKAkSEAoIUHJvcE5hbWUYCCABKAkSDwoHUHJvcE51bRgJIAEo", + "BRIOCgZTdGF0dXMYCiABKAkingIKDFRhc2tSZXNwb25zZRIOCgZUYXNrSWQY", + "ASABKAkSDgoGU3RhdHVzGAIgASgJEg4KBlJvb21JZBgDIAEoCRIJCgFYGAQg", + "ASgCEgkKAVkYBSABKAISCQoBWhgGIAEoAhIMCgRUeXBlGAcgASgJEhEKCVRp", + "bWVMaW1pdBgIIAEoAxIMCgREZXNjGAkgASgJEg8KB1RyaWdnZXIYCiABKAkS", + "EQoJTmV4dFRhc2tzGAsgASgJEhIKClRhcmdldFR5cGUYDCABKAkSDgoGUmV3", + "YXJkGA0gASgJEgwKBE5vdGUYDiABKAkSEgoKQ3JlYXRlVGltZRgPIAEoCRIS", + "CgpVcGRhdGVUaW1lGBAgASgJEhAKCFRvVXNlcklkGBEgASgJIlEKC1Rhc2tU", + "cmlnZ2VyEg4KBlVzZXJJZBgCIAEoCRIOCgZSb29tSWQYAyABKAkSEQoJVHJp", + "Z2dlcklkGAQgASgJEg8KB1R5cGVTdHIYBSABKAkiIwoOVGFza09ybVJlcXVl", + "c3QSEQoJc3ViamVjdElkGAEgASgJQgdaBS4vO3BiYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::TaskCreateRequest), global::TaskCreateRequest.Parser, new[]{ "RoomId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BaseTask), global::BaseTask.Parser, new[]{ "Id" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::TaskCreateResponse), global::TaskCreateResponse.Parser, new[]{ "Id", "X", "Y", "Z", "Type", "RoomId", "UserId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::TaskUpdateRequest), global::TaskUpdateRequest.Parser, new[]{ "RoomId", "TaskId", "UserId", "SelectId", "ToUserId", "UserName", "PropId", "PropName", "PropNum", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::TaskResponse), global::TaskResponse.Parser, new[]{ "TaskId", "Status", "RoomId", "X", "Y", "Z", "Type", "TimeLimit", "Desc", "Trigger", "NextTasks", "TargetType", "Reward", "Note", "CreateTime", "UpdateTime", "ToUserId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::TaskTrigger), global::TaskTrigger.Parser, new[]{ "UserId", "RoomId", "TriggerId", "TypeStr" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::TaskOrmRequest), global::TaskOrmRequest.Parser, new[]{ "SubjectId" }, null, null, null, null) + })); + } + #endregion + +} +#region Messages +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class TaskCreateRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskCreateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::TaskReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskCreateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskCreateRequest(TaskCreateRequest other) : this() { + roomId_ = other.roomId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskCreateRequest Clone() { + return new TaskCreateRequest(this); + } + + /// Field number for the "roomId" field. + public const int RoomIdFieldNumber = 1; + private string roomId_ = ""; + /// + /// 鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskCreateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskCreateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskCreateRequest other) { + if (other == null) { + return; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class BaseTask : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BaseTask()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::TaskReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BaseTask() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BaseTask(BaseTask other) : this() { + id_ = other.id_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BaseTask Clone() { + return new BaseTask(this); + } + + /// Field number for the "Id" field. + public const int IdFieldNumber = 1; + private string id_ = ""; + /// + /// 浠诲姟id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BaseTask); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BaseTask other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BaseTask other) { + if (other == null) { + return; + } + if (other.Id.Length != 0) { + Id = other.Id; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Id = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Id = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class TaskCreateResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskCreateResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::TaskReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskCreateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskCreateResponse(TaskCreateResponse other) : this() { + id_ = other.id_; + x_ = other.x_; + y_ = other.y_; + z_ = other.z_; + type_ = other.type_; + roomId_ = other.roomId_; + userId_ = other.userId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskCreateResponse Clone() { + return new TaskCreateResponse(this); + } + + /// Field number for the "Id" field. + public const int IdFieldNumber = 1; + private string id_ = ""; + /// + /// 浠诲姟id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "X" field. + public const int XFieldNumber = 2; + private float x_; + /// + /// x鍧愭爣 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float X { + get { return x_; } + set { + x_ = value; + } + } + + /// Field number for the "Y" field. + public const int YFieldNumber = 3; + private float y_; + /// + /// y鍧愭爣 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Y { + get { return y_; } + set { + y_ = value; + } + } + + /// Field number for the "Z" field. + public const int ZFieldNumber = 4; + private float z_; + /// + /// z鍧愭爣 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Z { + get { return z_; } + set { + z_ = value; + } + } + + /// Field number for the "Type" field. + public const int TypeFieldNumber = 5; + private int type_; + /// + /// 绫诲瀷 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Type { + get { return type_; } + set { + type_ = value; + } + } + + /// Field number for the "RoomId" field. + public const int RoomIdFieldNumber = 6; + private string roomId_ = ""; + /// + /// 鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "UserId" field. + public const int UserIdFieldNumber = 7; + private string userId_ = ""; + /// + /// 鐢ㄦ埛id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserId { + get { return userId_; } + set { + userId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskCreateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskCreateResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Z, other.Z)) return false; + if (Type != other.Type) return false; + if (RoomId != other.RoomId) return false; + if (UserId != other.UserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X); + if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y); + if (Z != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Z); + if (Type != 0) hash ^= Type.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (UserId.Length != 0) hash ^= UserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (X != 0F) { + output.WriteRawTag(21); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(29); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Z); + } + if (Type != 0) { + output.WriteRawTag(40); + output.WriteInt32(Type); + } + if (RoomId.Length != 0) { + output.WriteRawTag(50); + output.WriteString(RoomId); + } + if (UserId.Length != 0) { + output.WriteRawTag(58); + output.WriteString(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (X != 0F) { + output.WriteRawTag(21); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(29); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Z); + } + if (Type != 0) { + output.WriteRawTag(40); + output.WriteInt32(Type); + } + if (RoomId.Length != 0) { + output.WriteRawTag(50); + output.WriteString(RoomId); + } + if (UserId.Length != 0) { + output.WriteRawTag(58); + output.WriteString(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } + if (X != 0F) { + size += 1 + 4; + } + if (Y != 0F) { + size += 1 + 4; + } + if (Z != 0F) { + size += 1 + 4; + } + if (Type != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (UserId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskCreateResponse other) { + if (other == null) { + return; + } + if (other.Id.Length != 0) { + Id = other.Id; + } + if (other.X != 0F) { + X = other.X; + } + if (other.Y != 0F) { + Y = other.Y; + } + if (other.Z != 0F) { + Z = other.Z; + } + if (other.Type != 0) { + Type = other.Type; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.UserId.Length != 0) { + UserId = other.UserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Id = input.ReadString(); + break; + } + case 21: { + X = input.ReadFloat(); + break; + } + case 29: { + Y = input.ReadFloat(); + break; + } + case 37: { + Z = input.ReadFloat(); + break; + } + case 40: { + Type = input.ReadInt32(); + break; + } + case 50: { + RoomId = input.ReadString(); + break; + } + case 58: { + UserId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Id = input.ReadString(); + break; + } + case 21: { + X = input.ReadFloat(); + break; + } + case 29: { + Y = input.ReadFloat(); + break; + } + case 37: { + Z = input.ReadFloat(); + break; + } + case 40: { + Type = input.ReadInt32(); + break; + } + case 50: { + RoomId = input.ReadString(); + break; + } + case 58: { + UserId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class TaskUpdateRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskUpdateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::TaskReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskUpdateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskUpdateRequest(TaskUpdateRequest other) : this() { + roomId_ = other.roomId_; + taskId_ = other.taskId_; + userId_ = other.userId_; + selectId_ = other.selectId_; + toUserId_ = other.toUserId_; + userName_ = other.userName_; + propId_ = other.propId_; + propName_ = other.propName_; + propNum_ = other.propNum_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskUpdateRequest Clone() { + return new TaskUpdateRequest(this); + } + + /// Field number for the "RoomId" field. + public const int RoomIdFieldNumber = 1; + private string roomId_ = ""; + /// + /// 鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TaskId" field. + public const int TaskIdFieldNumber = 2; + private string taskId_ = ""; + /// + /// 浠诲姟id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TaskId { + get { return taskId_; } + set { + taskId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "UserId" field. + public const int UserIdFieldNumber = 3; + private string userId_ = ""; + /// + /// 鐢ㄦ埛id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserId { + get { return userId_; } + set { + userId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "SelectId" field. + public const int SelectIdFieldNumber = 4; + private string selectId_ = ""; + /// + /// 閫夐」ID 鐣岄潰鎸夐挳 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SelectId { + get { return selectId_; } + set { + selectId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ToUserId" field. + public const int ToUserIdFieldNumber = 5; + private string toUserId_ = ""; + /// + /// 鐩爣鐢ㄦ埛id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ToUserId { + get { return toUserId_; } + set { + toUserId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "UserName" field. + public const int UserNameFieldNumber = 6; + private string userName_ = ""; + /// + /// 鐢ㄦ埛鍚 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserName { + get { return userName_; } + set { + userName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "PropId" field. + public const int PropIdFieldNumber = 7; + private string propId_ = ""; + /// + ///閬撳叿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PropId { + get { return propId_; } + set { + propId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "PropName" field. + public const int PropNameFieldNumber = 8; + private string propName_ = ""; + /// + ///閬撳叿鍚嶇О + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PropName { + get { return propName_; } + set { + propName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "PropNum" field. + public const int PropNumFieldNumber = 9; + private int propNum_; + /// + ///閬撳叿鏁伴噺 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PropNum { + get { return propNum_; } + set { + propNum_ = value; + } + } + + /// Field number for the "Status" field. + public const int StatusFieldNumber = 10; + private string status_ = ""; + /// + /// 浠诲姟鐘舵 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskUpdateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskUpdateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoomId != other.RoomId) return false; + if (TaskId != other.TaskId) return false; + if (UserId != other.UserId) return false; + if (SelectId != other.SelectId) return false; + if (ToUserId != other.ToUserId) return false; + if (UserName != other.UserName) return false; + if (PropId != other.PropId) return false; + if (PropName != other.PropName) return false; + if (PropNum != other.PropNum) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (TaskId.Length != 0) hash ^= TaskId.GetHashCode(); + if (UserId.Length != 0) hash ^= UserId.GetHashCode(); + if (SelectId.Length != 0) hash ^= SelectId.GetHashCode(); + if (ToUserId.Length != 0) hash ^= ToUserId.GetHashCode(); + if (UserName.Length != 0) hash ^= UserName.GetHashCode(); + if (PropId.Length != 0) hash ^= PropId.GetHashCode(); + if (PropName.Length != 0) hash ^= PropName.GetHashCode(); + if (PropNum != 0) hash ^= PropNum.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (TaskId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TaskId); + } + if (UserId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(UserId); + } + if (SelectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(SelectId); + } + if (ToUserId.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ToUserId); + } + if (UserName.Length != 0) { + output.WriteRawTag(50); + output.WriteString(UserName); + } + if (PropId.Length != 0) { + output.WriteRawTag(58); + output.WriteString(PropId); + } + if (PropName.Length != 0) { + output.WriteRawTag(66); + output.WriteString(PropName); + } + if (PropNum != 0) { + output.WriteRawTag(72); + output.WriteInt32(PropNum); + } + if (Status.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoomId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RoomId); + } + if (TaskId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TaskId); + } + if (UserId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(UserId); + } + if (SelectId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(SelectId); + } + if (ToUserId.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ToUserId); + } + if (UserName.Length != 0) { + output.WriteRawTag(50); + output.WriteString(UserName); + } + if (PropId.Length != 0) { + output.WriteRawTag(58); + output.WriteString(PropId); + } + if (PropName.Length != 0) { + output.WriteRawTag(66); + output.WriteString(PropName); + } + if (PropNum != 0) { + output.WriteRawTag(72); + output.WriteInt32(PropNum); + } + if (Status.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (TaskId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TaskId); + } + if (UserId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserId); + } + if (SelectId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SelectId); + } + if (ToUserId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ToUserId); + } + if (UserName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserName); + } + if (PropId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PropId); + } + if (PropName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PropName); + } + if (PropNum != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PropNum); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskUpdateRequest other) { + if (other == null) { + return; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.TaskId.Length != 0) { + TaskId = other.TaskId; + } + if (other.UserId.Length != 0) { + UserId = other.UserId; + } + if (other.SelectId.Length != 0) { + SelectId = other.SelectId; + } + if (other.ToUserId.Length != 0) { + ToUserId = other.ToUserId; + } + if (other.UserName.Length != 0) { + UserName = other.UserName; + } + if (other.PropId.Length != 0) { + PropId = other.PropId; + } + if (other.PropName.Length != 0) { + PropName = other.PropName; + } + if (other.PropNum != 0) { + PropNum = other.PropNum; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + case 18: { + TaskId = input.ReadString(); + break; + } + case 26: { + UserId = input.ReadString(); + break; + } + case 34: { + SelectId = input.ReadString(); + break; + } + case 42: { + ToUserId = input.ReadString(); + break; + } + case 50: { + UserName = input.ReadString(); + break; + } + case 58: { + PropId = input.ReadString(); + break; + } + case 66: { + PropName = input.ReadString(); + break; + } + case 72: { + PropNum = input.ReadInt32(); + break; + } + case 82: { + Status = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RoomId = input.ReadString(); + break; + } + case 18: { + TaskId = input.ReadString(); + break; + } + case 26: { + UserId = input.ReadString(); + break; + } + case 34: { + SelectId = input.ReadString(); + break; + } + case 42: { + ToUserId = input.ReadString(); + break; + } + case 50: { + UserName = input.ReadString(); + break; + } + case 58: { + PropId = input.ReadString(); + break; + } + case 66: { + PropName = input.ReadString(); + break; + } + case 72: { + PropNum = input.ReadInt32(); + break; + } + case 82: { + Status = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class TaskResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::TaskReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskResponse(TaskResponse other) : this() { + taskId_ = other.taskId_; + status_ = other.status_; + roomId_ = other.roomId_; + x_ = other.x_; + y_ = other.y_; + z_ = other.z_; + type_ = other.type_; + timeLimit_ = other.timeLimit_; + desc_ = other.desc_; + trigger_ = other.trigger_; + nextTasks_ = other.nextTasks_; + targetType_ = other.targetType_; + reward_ = other.reward_; + note_ = other.note_; + createTime_ = other.createTime_; + updateTime_ = other.updateTime_; + toUserId_ = other.toUserId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskResponse Clone() { + return new TaskResponse(this); + } + + /// Field number for the "TaskId" field. + public const int TaskIdFieldNumber = 1; + private string taskId_ = ""; + /// + /// 浠诲姟id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TaskId { + get { return taskId_; } + set { + taskId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Status" field. + public const int StatusFieldNumber = 2; + private string status_ = ""; + /// + /// 鐘舵 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "RoomId" field. + public const int RoomIdFieldNumber = 3; + private string roomId_ = ""; + /// + /// 鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "X" field. + public const int XFieldNumber = 4; + private float x_; + /// + /// x鍧愭爣 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float X { + get { return x_; } + set { + x_ = value; + } + } + + /// Field number for the "Y" field. + public const int YFieldNumber = 5; + private float y_; + /// + /// y鍧愭爣 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Y { + get { return y_; } + set { + y_ = value; + } + } + + /// Field number for the "Z" field. + public const int ZFieldNumber = 6; + private float z_; + /// + /// z鍧愭爣 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Z { + get { return z_; } + set { + z_ = value; + } + } + + /// Field number for the "Type" field. + public const int TypeFieldNumber = 7; + private string type_ = ""; + /// + /// 绫诲瀷 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TimeLimit" field. + public const int TimeLimitFieldNumber = 8; + private long timeLimit_; + /// + /// 鏃堕棿闄愬埗 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TimeLimit { + get { return timeLimit_; } + set { + timeLimit_ = value; + } + } + + /// Field number for the "Desc" field. + public const int DescFieldNumber = 9; + private string desc_ = ""; + /// + /// 鎻忚堪 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Desc { + get { return desc_; } + set { + desc_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Trigger" field. + public const int TriggerFieldNumber = 10; + private string trigger_ = ""; + /// + /// 瑙﹀彂鏉′欢 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Trigger { + get { return trigger_; } + set { + trigger_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "NextTasks" field. + public const int NextTasksFieldNumber = 11; + private string nextTasks_ = ""; + /// + /// 涓嬩竴姝ヤ换鍔 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextTasks { + get { return nextTasks_; } + set { + nextTasks_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TargetType" field. + public const int TargetTypeFieldNumber = 12; + private string targetType_ = ""; + /// + /// 鐩爣绫诲瀷 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TargetType { + get { return targetType_; } + set { + targetType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Reward" field. + public const int RewardFieldNumber = 13; + private string reward_ = ""; + /// + /// 濂栧姳 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Reward { + get { return reward_; } + set { + reward_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Note" field. + public const int NoteFieldNumber = 14; + private string note_ = ""; + /// + /// 澶囨敞 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Note { + get { return note_; } + set { + note_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "CreateTime" field. + public const int CreateTimeFieldNumber = 15; + private string createTime_ = ""; + /// + /// 鍒涘缓鏃堕棿 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CreateTime { + get { return createTime_; } + set { + createTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "UpdateTime" field. + public const int UpdateTimeFieldNumber = 16; + private string updateTime_ = ""; + /// + /// 鏇存柊鏃堕棿 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UpdateTime { + get { return updateTime_; } + set { + updateTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ToUserId" field. + public const int ToUserIdFieldNumber = 17; + private string toUserId_ = ""; + /// + /// 鐩爣鐢ㄦ埛id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ToUserId { + get { return toUserId_; } + set { + toUserId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TaskId != other.TaskId) return false; + if (Status != other.Status) return false; + if (RoomId != other.RoomId) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Z, other.Z)) return false; + if (Type != other.Type) return false; + if (TimeLimit != other.TimeLimit) return false; + if (Desc != other.Desc) return false; + if (Trigger != other.Trigger) return false; + if (NextTasks != other.NextTasks) return false; + if (TargetType != other.TargetType) return false; + if (Reward != other.Reward) return false; + if (Note != other.Note) return false; + if (CreateTime != other.CreateTime) return false; + if (UpdateTime != other.UpdateTime) return false; + if (ToUserId != other.ToUserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TaskId.Length != 0) hash ^= TaskId.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X); + if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y); + if (Z != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Z); + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (TimeLimit != 0L) hash ^= TimeLimit.GetHashCode(); + if (Desc.Length != 0) hash ^= Desc.GetHashCode(); + if (Trigger.Length != 0) hash ^= Trigger.GetHashCode(); + if (NextTasks.Length != 0) hash ^= NextTasks.GetHashCode(); + if (TargetType.Length != 0) hash ^= TargetType.GetHashCode(); + if (Reward.Length != 0) hash ^= Reward.GetHashCode(); + if (Note.Length != 0) hash ^= Note.GetHashCode(); + if (CreateTime.Length != 0) hash ^= CreateTime.GetHashCode(); + if (UpdateTime.Length != 0) hash ^= UpdateTime.GetHashCode(); + if (ToUserId.Length != 0) hash ^= ToUserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TaskId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(TaskId); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (RoomId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoomId); + } + if (X != 0F) { + output.WriteRawTag(37); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(45); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Z); + } + if (Type.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Type); + } + if (TimeLimit != 0L) { + output.WriteRawTag(64); + output.WriteInt64(TimeLimit); + } + if (Desc.Length != 0) { + output.WriteRawTag(74); + output.WriteString(Desc); + } + if (Trigger.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Trigger); + } + if (NextTasks.Length != 0) { + output.WriteRawTag(90); + output.WriteString(NextTasks); + } + if (TargetType.Length != 0) { + output.WriteRawTag(98); + output.WriteString(TargetType); + } + if (Reward.Length != 0) { + output.WriteRawTag(106); + output.WriteString(Reward); + } + if (Note.Length != 0) { + output.WriteRawTag(114); + output.WriteString(Note); + } + if (CreateTime.Length != 0) { + output.WriteRawTag(122); + output.WriteString(CreateTime); + } + if (UpdateTime.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(UpdateTime); + } + if (ToUserId.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(ToUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TaskId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(TaskId); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (RoomId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoomId); + } + if (X != 0F) { + output.WriteRawTag(37); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(45); + output.WriteFloat(Y); + } + if (Z != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Z); + } + if (Type.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Type); + } + if (TimeLimit != 0L) { + output.WriteRawTag(64); + output.WriteInt64(TimeLimit); + } + if (Desc.Length != 0) { + output.WriteRawTag(74); + output.WriteString(Desc); + } + if (Trigger.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Trigger); + } + if (NextTasks.Length != 0) { + output.WriteRawTag(90); + output.WriteString(NextTasks); + } + if (TargetType.Length != 0) { + output.WriteRawTag(98); + output.WriteString(TargetType); + } + if (Reward.Length != 0) { + output.WriteRawTag(106); + output.WriteString(Reward); + } + if (Note.Length != 0) { + output.WriteRawTag(114); + output.WriteString(Note); + } + if (CreateTime.Length != 0) { + output.WriteRawTag(122); + output.WriteString(CreateTime); + } + if (UpdateTime.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(UpdateTime); + } + if (ToUserId.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(ToUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TaskId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TaskId); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (X != 0F) { + size += 1 + 4; + } + if (Y != 0F) { + size += 1 + 4; + } + if (Z != 0F) { + size += 1 + 4; + } + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (TimeLimit != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TimeLimit); + } + if (Desc.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Desc); + } + if (Trigger.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Trigger); + } + if (NextTasks.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextTasks); + } + if (TargetType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TargetType); + } + if (Reward.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Reward); + } + if (Note.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Note); + } + if (CreateTime.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CreateTime); + } + if (UpdateTime.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(UpdateTime); + } + if (ToUserId.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(ToUserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskResponse other) { + if (other == null) { + return; + } + if (other.TaskId.Length != 0) { + TaskId = other.TaskId; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.X != 0F) { + X = other.X; + } + if (other.Y != 0F) { + Y = other.Y; + } + if (other.Z != 0F) { + Z = other.Z; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.TimeLimit != 0L) { + TimeLimit = other.TimeLimit; + } + if (other.Desc.Length != 0) { + Desc = other.Desc; + } + if (other.Trigger.Length != 0) { + Trigger = other.Trigger; + } + if (other.NextTasks.Length != 0) { + NextTasks = other.NextTasks; + } + if (other.TargetType.Length != 0) { + TargetType = other.TargetType; + } + if (other.Reward.Length != 0) { + Reward = other.Reward; + } + if (other.Note.Length != 0) { + Note = other.Note; + } + if (other.CreateTime.Length != 0) { + CreateTime = other.CreateTime; + } + if (other.UpdateTime.Length != 0) { + UpdateTime = other.UpdateTime; + } + if (other.ToUserId.Length != 0) { + ToUserId = other.ToUserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TaskId = input.ReadString(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + case 26: { + RoomId = input.ReadString(); + break; + } + case 37: { + X = input.ReadFloat(); + break; + } + case 45: { + Y = input.ReadFloat(); + break; + } + case 53: { + Z = input.ReadFloat(); + break; + } + case 58: { + Type = input.ReadString(); + break; + } + case 64: { + TimeLimit = input.ReadInt64(); + break; + } + case 74: { + Desc = input.ReadString(); + break; + } + case 82: { + Trigger = input.ReadString(); + break; + } + case 90: { + NextTasks = input.ReadString(); + break; + } + case 98: { + TargetType = input.ReadString(); + break; + } + case 106: { + Reward = input.ReadString(); + break; + } + case 114: { + Note = input.ReadString(); + break; + } + case 122: { + CreateTime = input.ReadString(); + break; + } + case 130: { + UpdateTime = input.ReadString(); + break; + } + case 138: { + ToUserId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TaskId = input.ReadString(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + case 26: { + RoomId = input.ReadString(); + break; + } + case 37: { + X = input.ReadFloat(); + break; + } + case 45: { + Y = input.ReadFloat(); + break; + } + case 53: { + Z = input.ReadFloat(); + break; + } + case 58: { + Type = input.ReadString(); + break; + } + case 64: { + TimeLimit = input.ReadInt64(); + break; + } + case 74: { + Desc = input.ReadString(); + break; + } + case 82: { + Trigger = input.ReadString(); + break; + } + case 90: { + NextTasks = input.ReadString(); + break; + } + case 98: { + TargetType = input.ReadString(); + break; + } + case 106: { + Reward = input.ReadString(); + break; + } + case 114: { + Note = input.ReadString(); + break; + } + case 122: { + CreateTime = input.ReadString(); + break; + } + case 130: { + UpdateTime = input.ReadString(); + break; + } + case 138: { + ToUserId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class TaskTrigger : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskTrigger()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::TaskReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskTrigger() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskTrigger(TaskTrigger other) : this() { + userId_ = other.userId_; + roomId_ = other.roomId_; + triggerId_ = other.triggerId_; + typeStr_ = other.typeStr_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskTrigger Clone() { + return new TaskTrigger(this); + } + + /// Field number for the "UserId" field. + public const int UserIdFieldNumber = 2; + private string userId_ = ""; + /// + /// 鐢ㄦ埛id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserId { + get { return userId_; } + set { + userId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "RoomId" field. + public const int RoomIdFieldNumber = 3; + private string roomId_ = ""; + /// + /// 鎴块棿id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoomId { + get { return roomId_; } + set { + roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TriggerId" field. + public const int TriggerIdFieldNumber = 4; + private string triggerId_ = ""; + /// + /// 瑙﹀彂鍣╥d + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TriggerId { + get { return triggerId_; } + set { + triggerId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "TypeStr" field. + public const int TypeStrFieldNumber = 5; + private string typeStr_ = ""; + /// + /// 瑙﹀彂鍣ㄧ被鍨 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TypeStr { + get { return typeStr_; } + set { + typeStr_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskTrigger); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskTrigger other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (RoomId != other.RoomId) return false; + if (TriggerId != other.TriggerId) return false; + if (TypeStr != other.TypeStr) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId.Length != 0) hash ^= UserId.GetHashCode(); + if (RoomId.Length != 0) hash ^= RoomId.GetHashCode(); + if (TriggerId.Length != 0) hash ^= TriggerId.GetHashCode(); + if (TypeStr.Length != 0) hash ^= TypeStr.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(UserId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoomId); + } + if (TriggerId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(TriggerId); + } + if (TypeStr.Length != 0) { + output.WriteRawTag(42); + output.WriteString(TypeStr); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(UserId); + } + if (RoomId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoomId); + } + if (TriggerId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(TriggerId); + } + if (TypeStr.Length != 0) { + output.WriteRawTag(42); + output.WriteString(TypeStr); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserId); + } + if (RoomId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomId); + } + if (TriggerId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TriggerId); + } + if (TypeStr.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeStr); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskTrigger other) { + if (other == null) { + return; + } + if (other.UserId.Length != 0) { + UserId = other.UserId; + } + if (other.RoomId.Length != 0) { + RoomId = other.RoomId; + } + if (other.TriggerId.Length != 0) { + TriggerId = other.TriggerId; + } + if (other.TypeStr.Length != 0) { + TypeStr = other.TypeStr; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 18: { + UserId = input.ReadString(); + break; + } + case 26: { + RoomId = input.ReadString(); + break; + } + case 34: { + TriggerId = input.ReadString(); + break; + } + case 42: { + TypeStr = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 18: { + UserId = input.ReadString(); + break; + } + case 26: { + RoomId = input.ReadString(); + break; + } + case 34: { + TriggerId = input.ReadString(); + break; + } + case 42: { + TypeStr = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class TaskOrmRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TaskOrmRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::TaskReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskOrmRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskOrmRequest(TaskOrmRequest other) : this() { + subjectId_ = other.subjectId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TaskOrmRequest Clone() { + return new TaskOrmRequest(this); + } + + /// Field number for the "subjectId" field. + public const int SubjectIdFieldNumber = 1; + private string subjectId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SubjectId { + get { return subjectId_; } + set { + subjectId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TaskOrmRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TaskOrmRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (SubjectId != other.SubjectId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (SubjectId.Length != 0) hash ^= SubjectId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SubjectId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(SubjectId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SubjectId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(SubjectId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (SubjectId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SubjectId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TaskOrmRequest other) { + if (other == null) { + return; + } + if (other.SubjectId.Length != 0) { + SubjectId = other.SubjectId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + SubjectId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SubjectId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/Task.cs.meta b/xiaofang/Assets/comm/Proto/Task.cs.meta new file mode 100644 index 00000000..823f2628 --- /dev/null +++ b/xiaofang/Assets/comm/Proto/Task.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7dc2c5b09fa1821438dbc817a6f5cb74 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/Proto/User.cs b/xiaofang/Assets/comm/Proto/User.cs new file mode 100644 index 00000000..a818a57a --- /dev/null +++ b/xiaofang/Assets/comm/Proto/User.cs @@ -0,0 +1,1031 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: user.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from user.proto +public static partial class UserReflection { + + #region Descriptor + /// File descriptor for user.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static UserReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cgp1c2VyLnByb3RvIiQKElVzZXJPZmZsaW5lUmVxdWVzdBIOCgZ1c2VySWQY", + "ASABKAkiJQoTVXNlck9mZmxpbmVSZXNwb25zZRIOCgZ1c2VySWQYASABKAki", + "IQoPVXNlclJvbGVSZXF1ZXN0Eg4KBnJvbGVJZBgBIAEoBSKCAQoQVXNlclJv", + "bGVSZXNwb25zZRIOCgZyb2xlSWQYASABKAUSEAoIcm9sZU5hbWUYAiABKAkS", + "EgoKYWN0aW9uTW9kZRgDIAEoBRINCgVncm91cBgEIAEoBRITCgtncm91cExl", + "YWRlchgFIAEoBRIUCgxpc0xlYWRpbmdOUEMYBiABKAVCB1oFLi87cGJiBnBy", + "b3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::UserOfflineRequest), global::UserOfflineRequest.Parser, new[]{ "UserId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::UserOfflineResponse), global::UserOfflineResponse.Parser, new[]{ "UserId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::UserRoleRequest), global::UserRoleRequest.Parser, new[]{ "RoleId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::UserRoleResponse), global::UserRoleResponse.Parser, new[]{ "RoleId", "RoleName", "ActionMode", "Group", "GroupLeader", "IsLeadingNPC" }, null, null, null, null) + })); + } + #endregion + +} +#region Messages +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserOfflineRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserOfflineRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::UserReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserOfflineRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserOfflineRequest(UserOfflineRequest other) : this() { + userId_ = other.userId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserOfflineRequest Clone() { + return new UserOfflineRequest(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private string userId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserId { + get { return userId_; } + set { + userId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserOfflineRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserOfflineRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId.Length != 0) hash ^= UserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserOfflineRequest other) { + if (other == null) { + return; + } + if (other.UserId.Length != 0) { + UserId = other.UserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + UserId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + UserId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserOfflineResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserOfflineResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::UserReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserOfflineResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserOfflineResponse(UserOfflineResponse other) : this() { + userId_ = other.userId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserOfflineResponse Clone() { + return new UserOfflineResponse(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private string userId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserId { + get { return userId_; } + set { + userId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserOfflineResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserOfflineResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId.Length != 0) hash ^= UserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserOfflineResponse other) { + if (other == null) { + return; + } + if (other.UserId.Length != 0) { + UserId = other.UserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + UserId = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + UserId = input.ReadString(); + break; + } + } + } + } + #endif + +} + +/// +/// 瑙掕壊淇℃伅璇锋眰 +/// +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserRoleRequest : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserRoleRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::UserReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserRoleRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserRoleRequest(UserRoleRequest other) : this() { + roleId_ = other.roleId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserRoleRequest Clone() { + return new UserRoleRequest(this); + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private int roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserRoleRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserRoleRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoleId != other.RoleId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoleId != 0) hash ^= RoleId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0) { + output.WriteRawTag(8); + output.WriteInt32(RoleId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0) { + output.WriteRawTag(8); + output.WriteInt32(RoleId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoleId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RoleId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserRoleRequest other) { + if (other == null) { + return; + } + if (other.RoleId != 0) { + RoleId = other.RoleId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoleId = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt32(); + break; + } + } + } + } + #endif + +} + +/// +/// 瑙掕壊淇℃伅鍝嶅簲 +/// +[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] +public sealed partial class UserRoleResponse : pb::IMessage +#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage +#endif +{ + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserRoleResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::UserReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserRoleResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserRoleResponse(UserRoleResponse other) : this() { + roleId_ = other.roleId_; + roleName_ = other.roleName_; + actionMode_ = other.actionMode_; + group_ = other.group_; + groupLeader_ = other.groupLeader_; + isLeadingNPC_ = other.isLeadingNPC_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserRoleResponse Clone() { + return new UserRoleResponse(this); + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private int roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "roleName" field. + public const int RoleNameFieldNumber = 2; + private string roleName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoleName { + get { return roleName_; } + set { + roleName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "actionMode" field. + public const int ActionModeFieldNumber = 3; + private int actionMode_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ActionMode { + get { return actionMode_; } + set { + actionMode_ = value; + } + } + + /// Field number for the "group" field. + public const int GroupFieldNumber = 4; + private int group_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Group { + get { return group_; } + set { + group_ = value; + } + } + + /// Field number for the "groupLeader" field. + public const int GroupLeaderFieldNumber = 5; + private int groupLeader_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int GroupLeader { + get { return groupLeader_; } + set { + groupLeader_ = value; + } + } + + /// Field number for the "isLeadingNPC" field. + public const int IsLeadingNPCFieldNumber = 6; + private int isLeadingNPC_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int IsLeadingNPC { + get { return isLeadingNPC_; } + set { + isLeadingNPC_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserRoleResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserRoleResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoleId != other.RoleId) return false; + if (RoleName != other.RoleName) return false; + if (ActionMode != other.ActionMode) return false; + if (Group != other.Group) return false; + if (GroupLeader != other.GroupLeader) return false; + if (IsLeadingNPC != other.IsLeadingNPC) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoleId != 0) hash ^= RoleId.GetHashCode(); + if (RoleName.Length != 0) hash ^= RoleName.GetHashCode(); + if (ActionMode != 0) hash ^= ActionMode.GetHashCode(); + if (Group != 0) hash ^= Group.GetHashCode(); + if (GroupLeader != 0) hash ^= GroupLeader.GetHashCode(); + if (IsLeadingNPC != 0) hash ^= IsLeadingNPC.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0) { + output.WriteRawTag(8); + output.WriteInt32(RoleId); + } + if (RoleName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RoleName); + } + if (ActionMode != 0) { + output.WriteRawTag(24); + output.WriteInt32(ActionMode); + } + if (Group != 0) { + output.WriteRawTag(32); + output.WriteInt32(Group); + } + if (GroupLeader != 0) { + output.WriteRawTag(40); + output.WriteInt32(GroupLeader); + } + if (IsLeadingNPC != 0) { + output.WriteRawTag(48); + output.WriteInt32(IsLeadingNPC); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0) { + output.WriteRawTag(8); + output.WriteInt32(RoleId); + } + if (RoleName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RoleName); + } + if (ActionMode != 0) { + output.WriteRawTag(24); + output.WriteInt32(ActionMode); + } + if (Group != 0) { + output.WriteRawTag(32); + output.WriteInt32(Group); + } + if (GroupLeader != 0) { + output.WriteRawTag(40); + output.WriteInt32(GroupLeader); + } + if (IsLeadingNPC != 0) { + output.WriteRawTag(48); + output.WriteInt32(IsLeadingNPC); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoleId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RoleId); + } + if (RoleName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoleName); + } + if (ActionMode != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ActionMode); + } + if (Group != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Group); + } + if (GroupLeader != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(GroupLeader); + } + if (IsLeadingNPC != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(IsLeadingNPC); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserRoleResponse other) { + if (other == null) { + return; + } + if (other.RoleId != 0) { + RoleId = other.RoleId; + } + if (other.RoleName.Length != 0) { + RoleName = other.RoleName; + } + if (other.ActionMode != 0) { + ActionMode = other.ActionMode; + } + if (other.Group != 0) { + Group = other.Group; + } + if (other.GroupLeader != 0) { + GroupLeader = other.GroupLeader; + } + if (other.IsLeadingNPC != 0) { + IsLeadingNPC = other.IsLeadingNPC; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoleId = input.ReadInt32(); + break; + } + case 18: { + RoleName = input.ReadString(); + break; + } + case 24: { + ActionMode = input.ReadInt32(); + break; + } + case 32: { + Group = input.ReadInt32(); + break; + } + case 40: { + GroupLeader = input.ReadInt32(); + break; + } + case 48: { + IsLeadingNPC = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt32(); + break; + } + case 18: { + RoleName = input.ReadString(); + break; + } + case 24: { + ActionMode = input.ReadInt32(); + break; + } + case 32: { + Group = input.ReadInt32(); + break; + } + case 40: { + GroupLeader = input.ReadInt32(); + break; + } + case 48: { + IsLeadingNPC = input.ReadInt32(); + break; + } + } + } + } + #endif + +} + +#endregion + + +#endregion Designer generated code diff --git a/xiaofang/Assets/comm/Proto/User.cs.meta b/xiaofang/Assets/comm/Proto/User.cs.meta new file mode 100644 index 00000000..19dd7dfd --- /dev/null +++ b/xiaofang/Assets/comm/Proto/User.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 89dab302d915deb4ba459f561a2a9f15 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/test/Ws.cs b/xiaofang/Assets/comm/Proto/Ws.cs similarity index 99% rename from xiaofang/Assets/test/Ws.cs rename to xiaofang/Assets/comm/Proto/Ws.cs index 3da1cd10..a7ce9133 100644 --- a/xiaofang/Assets/test/Ws.cs +++ b/xiaofang/Assets/comm/Proto/Ws.cs @@ -320,7 +320,7 @@ public sealed partial class WSMessage : pb::IMessage } } #endif - } + } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/xiaofang/Assets/test/Ws.cs.meta b/xiaofang/Assets/comm/Proto/Ws.cs.meta similarity index 83% rename from xiaofang/Assets/test/Ws.cs.meta rename to xiaofang/Assets/comm/Proto/Ws.cs.meta index dd9d6b70..f2e9d98e 100644 --- a/xiaofang/Assets/test/Ws.cs.meta +++ b/xiaofang/Assets/comm/Proto/Ws.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b1a0e968aa808f743ae45f5525efa824 +guid: 6d54b057f10017a4d98893bdbd8509e0 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/xiaofang/Assets/comm/WEBScriptListener.cs b/xiaofang/Assets/comm/WEBScriptListener.cs new file mode 100644 index 00000000..436b1336 --- /dev/null +++ b/xiaofang/Assets/comm/WEBScriptListener.cs @@ -0,0 +1,215 @@ +// WebSocket +using Google.Protobuf.WellKnownTypes; +using System; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading; +using UnityEngine; +using UnityWebSocket; +/// +/// Socket连接 +/// +public class WEBScriptListener: MonoBehaviour +{ + public string serverIP = "ws://192.168.3.110"; + //服务器端口 + public int serverPort = 8445; + WebSocket socket; + public string type; // 类型 + public delegate void MyCallback(byte[] data); + public event MyCallback OnCallback; + public void ConcatWEBSocket() + { + socket = new WebSocket($"{serverIP}:{serverPort}/safety/cloud"); + socket.OnOpen += Socket_OnOpen; + socket.OnMessage += Socket_OnMessage; + socket.OnError += Socket_OnError; + socket.ConnectAsync(); + Debug.Log($"执行websocket"); + } + private void Socket_OnOpen(object sender, OpenEventArgs e) + { + Debug.Log("================"); + } + void Socket_OnMessage(object sender, MessageEventArgs e) + { + var data = Encoding.UTF8.GetString(e.RawData); + if (OnCallback != null) + { + Debug.Log(e.RawData); + OnCallback(e.RawData); + } + + } + void Socket_OnError(object sender, ErrorEventArgs e) + { + Debug.Log(string.Format("Error: {0}", e.Message)); + } + public void SendMessageByte(byte[] message) + { + if (socket != null) + { + Debug.Log("发送信息"); + Debug.Log(string.Format("Error: {0}", message)); + socket.SendAsync(message); + } + else + { + Debug.LogError("WebSocket is not connected!"); + } + } + public void SendMessageText(string message) + { + if (socket != null) + { + Debug.Log("发送信息"); + socket.SendAsync(message); + } + else + { + Debug.LogError("WebSocket is not connected!"); + } + } + //服务器端口 + /*public string serverIP = "192.168.3.110"; + public int serverPort = 8445; + Socket socket; + private bool IsConnect = true; + private string recMes = "NULL"; + private int recTimes = 0; + private string staInfo = "NULL"; + private object s_thread; + + public void ConcatWEBSocket() + { + socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + try + { + IPAddress ip = IPAddress.Parse(serverIP); + IPEndPoint point = new IPEndPoint(ip, serverPort); + + socket.Connect(point); + Debug.Log("连接成功 , " + " ip = " + ip + " port = " + serverPort); + staInfo = ip + ":" + serverPort + " 连接成功"; + Thread r_thread = new Thread(ReceiveMessage); //开启新的线程,不停的接收服务器发来的消息 + r_thread.IsBackground = true; + r_thread.Start(); + + Thread s_thread = new Thread(SendMessage); //开启新的线程,不停的给服务器发送消息 + s_thread.IsBackground = true; + s_thread.Start(); + } + catch (Exception) + { + Debug.Log("IP或者端口号错误......"); + staInfo = "IP或者端口号错误......"; + } + + + + } + + void SendMessage() + { + Debug.Log("发送消息!"); + byte[] data = Encoding.UTF8.GetBytes("CCDDA10100010001A448"); + socket.Send(data); + } + void ReceiveMessage() + { + while (IsConnect) + { + try + { + byte[] buffer = new byte[9]; + //实际接收到的有效字节数 + int len = socket.Receive(buffer); + if (len == 0) + { + break; + } + + recMes = HexDecoder.ByteArrayToString(buffer); + Debug.Log("客户端接收到的数据 : " + len); + Debug.Log("客户端接收到的数据 : " + recMes.ToUpper()); + + recTimes++; + staInfo = "接收到一次数据,接收次数为 :" + recTimes; + Debug.Log("接收次数为:" + recTimes); + } + catch { } + } + + } + // HEX 转换为16进制 + public class HexDecoder + { + public static string ByteArrayToString(byte[] ba) + { + StringBuilder hex = new StringBuilder(ba.Length * 2); + foreach (byte b in ba) + hex.AppendFormat("{0:x2}", b); + return hex.ToString(); + } + }*/ + +} + +/*using System.Net.Sockets; +using System.Net; +using System.Text; +using System.IO; +using UnityEngine; +public class WEBScriptListener +{ + public void TCPServerDemo() + { + //服务端的IP地址 + //请先在终端上查询服务器IP + string serverIP = "192.168.3.218"; + //服务器端口 + int serverPort = 50000; + + Debug.Log("本机作为服务端"); + Debug.Log($"本机IP:{serverIP},端口:{serverPort}"); + + //使用指定的地址族,套接字类型和协议实例化新的套接字 + Socket socketServer = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + //将字符串地址转化为网际协议地址 + IPAddress ipAddress = IPAddress.Parse(serverIP);//这里为服务器IP + //使用指定地址和端口号实例化新的网络端点 + IPEndPoint endPoint = new IPEndPoint(ipAddress, serverPort);//ipAddress为服务器IP , 6000为服务器端口 + Debug.Log(string.Format("消息: {0}", endPoint)); + try + { + //socket与本地终结点相关联,绑定IP与端口 + socketServer.Bind(endPoint); + //设置最大侦听长度,并启动侦听 + socketServer.Listen(200); + } + catch + { + Debug.Log("请检查IP是否正确,或端口是否被占用?"); + socketServer.Close(); + return; + } + + Debug.Log("启动侦听,等待客户端请求连接。。。"); + //等待客户端连接,如果没有客户端连接,即会一址等待 + //1、将硬件设备为TCP_Client + //2、将硬件的目的IP设置与 serverIP 一致的值 + //3、将硬件的目的端口设备与 serverPort 一致的值 + //如果硬件不能连接上,请检查以上参数 + Socket socket = socketServer.Accept(); + Debug.Log("连接成功"); + + string[] strs = socket.RemoteEndPoint.ToString().Split(':'); + Debug.Log("客户端IP:" + strs[0] + " 端口:" + strs[1]); + // 以下为数据发送与接收 + + Debug.Log("测试完成"); + } + +} +*/ \ No newline at end of file diff --git a/xiaofang/Assets/comm/WEBScriptListener.cs.meta b/xiaofang/Assets/comm/WEBScriptListener.cs.meta new file mode 100644 index 00000000..b79b8032 --- /dev/null +++ b/xiaofang/Assets/comm/WEBScriptListener.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 44720823678ca7c42a08f4409ab025ff +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/comm/test.cs b/xiaofang/Assets/comm/test.cs new file mode 100644 index 00000000..4ee36644 --- /dev/null +++ b/xiaofang/Assets/comm/test.cs @@ -0,0 +1,347 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Newtonsoft.Json; +using System.Net.Sockets; +using UnityWebSocket; +using System.Text; +using Google.Protobuf; +using System.Net.WebSockets; +using System; +using System.Threading.Tasks; +public class test : MonoBehaviour +{ + public string token; + public WEBScriptListener wEBScriptListener; + public class auth_login + { + public string clientId = "e5cd7e4891bf95d1d19206ce24a7b32e"; + public string grantType = "password"; + public string userType = "company_user"; + public string username = "13699802230"; + public string password = "YYL2230!"; + } + public async void loging() + { + auth_login auth_Login = new auth_login(); + string response = await web.SendRequest(web.URL + "/auth/login", "POST", JsonUtility.ToJson(auth_Login)); + + // 解析服务器返回的数据 + server serverData = JsonConvert.DeserializeObject(response); + token = serverData.data.access_token; + //Debug.Log(setverData.msg); + + } + //登录 + void lodingWebSocket() + { + LoginRequest data = new LoginRequest(); + data.UserId = "1846032755921199105"; + data.Account = "13152628999"; + + + WSMessage msg = new WSMessage(); + msg.Module = "hall"; + msg.ServiceName = "Login"; + msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + byte[] sendData = ProtoBufffer.Serialize(msg); + WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + LoginRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + Debug.Log("登录"); + + wEBScriptListener.SendMessageByte(sendData); + } + //加入房间 + void JoinRoom() + { + JoinRoomRequest data = new JoinRoomRequest(); + data.RoomId = "168888"; + WSMessage msg = new WSMessage(); + msg.Module = "hall"; + msg.ServiceName = "JoinRoom"; + msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + byte[] sendData = ProtoBufffer.Serialize(msg); + WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + JoinRoomRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + Debug.Log("加入房间"); + //BroadcastFrameMsg.FramesFieldNumber + + + wEBScriptListener.SendMessageByte(sendData); + } + + //void BroadcastMessage() + //{ + // WSMessage msg = new WSMessage(); + // msg.Module = "hall"; + // msg.ServiceName = "BroadcastMessage"; + // //msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + // byte[] sendData = ProtoBufffer.Serialize(msg); + // WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + // JoinRoomRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + // Debug.Log("加入房间"); + // //BroadcastFrameMsg.FramesFieldNumber + + + // wEBScriptListener.SendMessageByte(sendData); + //} + + //心跳 + async void Heartbeat() + { + //WSMessage msg = new WSMessage(); + //msg.Data = ByteString.CopyFrom(new byte[] { 1 }); + //byte[] sendData = ProtoBufffer.Serialize(msg); + //Debug.Log(""); + while (true) + { + WSMessage msg = new WSMessage(); + msg.Module = "ping"; + //msg.Data = ByteString.CopyFrom(new byte[] { 1 }); + byte[] sendData = ProtoBufffer.Serialize(msg); + // 每秒执行的任务 + Debug.Log("每秒执行一次"); + wEBScriptListener.SendMessageByte(sendData); + + // 等待一秒 + await Task.Delay(1000); + } + } + //帧存储操作输入 + //void UpFps() + //{ + // InputData data = new InputData(); + // data.RoomId = "168888"; + // data.Id = "778899"; + // data.SId = "7"; + // data.X = 7f; + // data.Y = 5f; + // data.Z = 4f; + // data.RoomSeatId = 5; + // WSMessage msg = new WSMessage(); + // msg.Module = "fps"; + // msg.ServiceName = "UpFps"; + // msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + // byte[] sendData = ProtoBufffer.Serialize(msg); + // WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + // InputData login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + // Debug.Log("帧存储操作输入"); + // //BroadcastFrameMsg.FramesFieldNumber + + // wEBScriptListener.SendMessageByte(sendData); + //} + + //拾取道具 + void PickUpProp() + { + PropRequest data = new PropRequest(); + data.PropId = 1001; + data.RoomId = "168888"; + WSMessage msg = new WSMessage(); + msg.Module = "prop"; + msg.ServiceName = "PickUpProp"; + msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + byte[] sendData = ProtoBufffer.Serialize(msg); + WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + PropRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + Debug.Log("拾取道具"); + //BroadcastFrameMsg.FramesFieldNumber + + wEBScriptListener.SendMessageByte(sendData); + } + + //使用道具 + void StartUseProp() + { + PropRequest data = new PropRequest(); + data.RoomId = "168888"; + data.PropId = 1001; + data.Action = 1; + data.PropServerId = "MTg1OTc5MDMwOTIyODc4OTc2MA=="; + WSMessage msg = new WSMessage(); + msg.Module = "prop"; + msg.ServiceName = "StartUseProp"; + msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + byte[] sendData = ProtoBufffer.Serialize(msg); + WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + PropRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + Debug.Log("使用道具"); + //BroadcastFrameMsg.FramesFieldNumber + + wEBScriptListener.SendMessageByte(sendData); + } + //停止使用道具 + void StopUseProp() + { + PropRequest data = new PropRequest(); + data.RoomId = "168888"; + data.PropId = 1001; + data.PropServerId = "MTg1OTc5MDMwOTIyODc4OTc2MA=="; + WSMessage msg = new WSMessage(); + msg.Module = "prop"; + msg.ServiceName = "StopUseProp"; + msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + byte[] sendData = ProtoBufffer.Serialize(msg); + WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + PropRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + Debug.Log("停止使用道具"); + //BroadcastFrameMsg.FramesFieldNumber + + wEBScriptListener.SendMessageByte(sendData); + } + + //创建NPC ========================暂时不需要 + //void CreateNpc() + //{ + // PropRequest data = new PropRequest(); + // data.RoomId = "168888"; + // WSMessage msg = new WSMessage(); + // msg.Module = "move"; + // msg.ServiceName = "CreateNpc"; + // msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + // byte[] sendData = ProtoBufffer.Serialize(msg); + // WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + // PropRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + // Debug.Log("创建NPC"); + // //BroadcastFrameMsg.FramesFieldNumber + + // wEBScriptListener.SendMessageByte(sendData); + //} + + //推送npc和玩家的信息 ===============只需要收消息 + //void Location() + //{ + // PropRequest data = new PropRequest(); + // data.RoomId = "168888"; + // WSMessage msg = new WSMessage(); + // msg.Module = "prop"; + // msg.ServiceName = "CreateNpc"; + // msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + // byte[] sendData = ProtoBufffer.Serialize(msg); + // WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + // PropRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + // Debug.Log("推送npc和玩家的信息"); + // //BroadcastFrameMsg.FramesFieldNumber + + // wEBScriptListener.SendMessageByte(sendData); + //} + + + + //开始计时 + void RoomStartTime() + { + JoinRoomRequest data = new JoinRoomRequest(); + data.RoomId = "168888"; + WSMessage msg = new WSMessage(); + msg.Module = "hall"; + msg.ServiceName = "RoomStartTime"; + msg.Data = ByteString.CopyFrom(ProtoBufffer.Serialize(data)); + byte[] sendData = ProtoBufffer.Serialize(msg); + WSMessage deinfo = ProtoBufffer.DeSerialize(sendData); + JoinRoomRequest login = ProtoBufffer.DeSerialize(deinfo.Data.ToByteArray()); + Debug.Log("推送npc和玩家的信息"); + //BroadcastFrameMsg.FramesFieldNumber + + wEBScriptListener.SendMessageByte(sendData); + } + + + + + + + + + // Start is called before the first frame update + void Start() + { + //loging(); + wEBScriptListener.ConcatWEBSocket(); + wEBScriptListener.OnCallback += callback; + if (wEBScriptListener != null) + { + lodingWebSocket(); + JoinRoom(); + //Heartbeat(); + //BroadcastMessage(); + //UpFps(); + PickUpProp(); + StartUseProp(); + StopUseProp(); + //RoomStartTime(); + + } + } + + void callback(byte[] data) + { + WSResponse deinfo = ProtoBufffer.DeSerialize(data); + Debug.Log("返回数据类型:"+deinfo.MessageType); + byte[] bytes = deinfo.Data.ToByteArray(); + switch (deinfo.MessageType) + { + //监听 + //登录 + case "hall.Login": + LoginResponse user = ProtoBufffer.DeSerialize(bytes); + Debug.Log(user.Message); + break; + + //加入房间 + case "hall.JoinRoom": + JoinRoomResponse joinRoomResponse = ProtoBufffer.DeSerialize(bytes); + byte[] joinByte = joinRoomResponse.Data.ToByteArray(); + PlayerJoinResponse playerJoinResponse = ProtoBufffer.DeSerialize(joinByte); + Debug.Log("玩家:"+playerJoinResponse.UserName+"加入房间:"+playerJoinResponse.RoomId.ToString()); + break; + + //广播 + case "hall.BroadcastMessage": + UserJoinResponse userJoinResponse = ProtoBufffer.DeSerialize(bytes); + Debug.Log("玩家昵称:" + userJoinResponse.NickName + ",房间:" + userJoinResponse.RoomId.ToString() + ",用户角色"+ userJoinResponse.RoleName); + break; + + // + case "fps.UpFps": + InputData inputData = ProtoBufffer.DeSerialize(bytes); + Debug.Log("Id:" + inputData.Id + ",sId :" + inputData.SId + ",X:"+ inputData.X.ToString() + ",Y:" + inputData.Y.ToString() + ",roomSeatId :" + inputData.RoomSeatId + ",z:" + inputData.Z.ToString() + ",roomId:" + inputData.RoomId); + break; + + case "prop.PickUpProp": + PropRequest propRequest = ProtoBufffer.DeSerialize(bytes); + Debug.Log("PropId:" + propRequest.PropId); + break; + + case "prop.StartUseProp": + PropResponse useProp = ProtoBufffer.DeSerialize(bytes); + + Debug.Log("PropId:" + useProp); + break; + + case "prop.StopUseProp": + PropResponse stopuseProp = ProtoBufffer.DeSerialize(bytes); + + Debug.Log("PropId:" + stopuseProp); + break; + + //case "prop.CreateNpc": + // MoveResponse moveResponse = ProtoBufffer.DeSerialize(bytes); + // Debug.Log("UserId:" + moveResponse.UserId + ",RoomId:" + moveResponse.RoomId + ",x:" + moveResponse.MoveData); + // break; + + + + //case "hall.RoomStartTime": + // JoinRoomRequest joinRoomRequest = ProtoBufffer.DeSerialize(bytes); + // Debug.Log("PropId:" + joinRoomRequest.RoomId); + // break; + //case " hall.MessageToUser": + // //JoinRoomRequest joinRoomRequest = ProtoBufffer.DeSerialize(bytes); + // //Debug.Log("PropId:" + joinRoomRequest.RoomId); + // break; + + } + } + +} diff --git a/xiaofang/Assets/comm/test.cs.meta b/xiaofang/Assets/comm/test.cs.meta new file mode 100644 index 00000000..21f53bce --- /dev/null +++ b/xiaofang/Assets/comm/test.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c68b1dcfbba61b44ca68572c16b16b95 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: