This commit is contained in:
shurongsen 2024-12-04 10:08:59 +08:00
parent 9a519a9df0
commit 299cebc91a
30 changed files with 24008 additions and 4 deletions

8
Proto.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ba933e54a4c5cfa408443ed45c497e0a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

281
Proto/Common.cs Normal file
View File

@ -0,0 +1,281 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: common.proto
// </auto-generated>
#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;
/// <summary>Holder for reflection information generated from common.proto</summary>
public static partial class CommonReflection {
#region Descriptor
/// <summary>File descriptor for common.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static CommonReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cgxjb21tb24ucHJvdG8iLgoNUmVzdWx0TWVzc2FnZRIMCgRjb2RlGAEgASgF",
"Eg8KB21lc3NhZ2UYAiABKAlCB1oFLi87cGJiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::ResultMessage), global::ResultMessage.Parser, new[]{ "Code", "Message" }, null, null, null, null)
}));
}
#endregion
}
#region Messages
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class ResultMessage : pb::IMessage<ResultMessage>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<ResultMessage> _parser = new pb::MessageParser<ResultMessage>(() => new ResultMessage());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<ResultMessage> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::CommonReflection.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 ResultMessage() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ResultMessage(ResultMessage other) : this() {
code_ = other.code_;
message_ = other.message_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public ResultMessage Clone() {
return new ResultMessage(this);
}
/// <summary>Field number for the "code" field.</summary>
public const int CodeFieldNumber = 1;
private int code_;
/// <summary>
/// 错误码
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int Code {
get { return code_; }
set {
code_ = value;
}
}
/// <summary>Field number for the "message" field.</summary>
public const int MessageFieldNumber = 2;
private string message_ = "";
/// <summary>
/// 错误信息
/// </summary>
[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 ResultMessage);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(ResultMessage other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
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 (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 (Code != 0) {
output.WriteRawTag(8);
output.WriteInt32(Code);
}
if (Message.Length != 0) {
output.WriteRawTag(18);
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 (Code != 0) {
output.WriteRawTag(8);
output.WriteInt32(Code);
}
if (Message.Length != 0) {
output.WriteRawTag(18);
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 (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(ResultMessage other) {
if (other == null) {
return;
}
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: {
Code = input.ReadInt32();
break;
}
case 18: {
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 8: {
Code = input.ReadInt32();
break;
}
case 18: {
Message = input.ReadString();
break;
}
}
}
}
#endif
}
#endregion
#endregion Designer generated code

11
Proto/Common.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8f08a6ce1ce72944ab924e71bac47c6f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

83
Proto/Config.cs Normal file
View File

@ -0,0 +1,83 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: config.proto
// </auto-generated>
#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;
/// <summary>Holder for reflection information generated from config.proto</summary>
public static partial class ConfigReflection {
#region Descriptor
/// <summary>File descriptor for config.proto</summary>
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
/// <summary>
///错误码
/// </summary>
public enum ERROR_CODE {
/// <summary>
///OK
/// </summary>
[pbr::OriginalName("ERR_Ok")] ErrOk = 0,
/// <summary>
///没有这个玩家
/// </summary>
[pbr::OriginalName("ERR_NoPlayer")] ErrNoPlayer = 1,
/// <summary>
///加入房间失败
/// </summary>
[pbr::OriginalName("ERR_NoRoom")] ErrNoRoom = 2,
/// <summary>
///Token验证失败
/// </summary>
[pbr::OriginalName("ERR_Token")] ErrToken = 4,
/// <summary>
///登录失败
/// </summary>
[pbr::OriginalName("ERR_Login")] ErrLogin = 5,
/// <summary>
///操作失败
/// </summary>
[pbr::OriginalName("ERR_Action")] ErrAction = 6,
/// <summary>
///参数错误
/// </summary>
[pbr::OriginalName("ERR_Params")] ErrParams = 7,
/// <summary>
///服务器内部错误
/// </summary>
[pbr::OriginalName("ERR_Server")] ErrServer = 8,
/// <summary>
///没有权限
/// </summary>
[pbr::OriginalName("ERR_NoAuthority")] ErrNoAuthority = 9,
}
#endregion
#endregion Designer generated code

11
Proto/Config.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6249125b6bd7a964aa825c041b9cab82
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

1099
Proto/Fps.cs Normal file

File diff suppressed because it is too large Load Diff

11
Proto/Fps.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 013d659005f08544cafe01b5a18e6072
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

4875
Proto/Hall.cs Normal file

File diff suppressed because it is too large Load Diff

11
Proto/Hall.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8fd26537609bdf14b8eb7d5150ef5262
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

2837
Proto/Join.cs Normal file

File diff suppressed because it is too large Load Diff

11
Proto/Join.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 63abcfa0f6080534d8642cfb5eae1ac0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

525
Proto/MessageBroadcast.cs Normal file
View File

@ -0,0 +1,525 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: message_broadcast.proto
// </auto-generated>
#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;
/// <summary>Holder for reflection information generated from message_broadcast.proto</summary>
public static partial class MessageBroadcastReflection {
#region Descriptor
/// <summary>File descriptor for message_broadcast.proto</summary>
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<MessageBroadcastRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<MessageBroadcastRequest> _parser = new pb::MessageParser<MessageBroadcastRequest>(() => new MessageBroadcastRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<MessageBroadcastRequest> 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);
}
/// <summary>Field number for the "roomId" field.</summary>
public const int RoomIdFieldNumber = 1;
private string roomId_ = "";
/// <summary>
/// 房间id
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string RoomId {
get { return roomId_; }
set {
roomId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "type" field.</summary>
public const int TypeFieldNumber = 2;
private int type_;
/// <summary>
/// 消息类型 1. 文本 2. 图片 3. 语音 4. 视频
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int Type {
get { return type_; }
set {
type_ = value;
}
}
/// <summary>Field number for the "roleId" field.</summary>
public const int RoleIdFieldNumber = 3;
private string roleId_ = "";
/// <summary>
/// 角色Id 如果为空就是给所有人发
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string RoleId {
get { return roleId_; }
set {
roleId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "cmd" field.</summary>
public const int CmdFieldNumber = 4;
private string cmd_ = "";
/// <summary>
/// 自定义命令
/// </summary>
[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<MessageBroadcastResponse>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<MessageBroadcastResponse> _parser = new pb::MessageParser<MessageBroadcastResponse>(() => new MessageBroadcastResponse());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<MessageBroadcastResponse> 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

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 061900a49550cc74582eb8e4598a886b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

2008
Proto/Move.cs Normal file

File diff suppressed because it is too large Load Diff

11
Proto/Move.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3b549e9113344b542a6f785f98166927
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

1497
Proto/Object.cs Normal file

File diff suppressed because it is too large Load Diff

11
Proto/Object.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7a2dfd72791480141a3dca377b5196d1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

1936
Proto/Prop.cs Normal file

File diff suppressed because it is too large Load Diff

11
Proto/Prop.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 66a0cd6fc174b4042b409c9030c08516
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

28
Proto/ProtoBufffer.cs Normal file
View File

@ -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<T>(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<T>(ByteString data)
{
throw new NotImplementedException();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cbf21bdbee5a320489df7092ce24d9a7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

4094
Proto/Room.cs Normal file

File diff suppressed because it is too large Load Diff

11
Proto/Room.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: efe7f33d728ac2948956f9a0bcf43259
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

2826
Proto/Task.cs Normal file

File diff suppressed because it is too large Load Diff

11
Proto/Task.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7dc2c5b09fa1821438dbc817a6f5cb74
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

1031
Proto/User.cs Normal file

File diff suppressed because it is too large Load Diff

11
Proto/User.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 89dab302d915deb4ba459f561a2a9f15
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

726
Proto/Ws.cs Normal file
View File

@ -0,0 +1,726 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ws.proto
// </auto-generated>
#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;
/// <summary>Holder for reflection information generated from ws.proto</summary>
public static partial class WsReflection {
#region Descriptor
/// <summary>File descriptor for ws.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static WsReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cgh3cy5wcm90byJNCglXU01lc3NhZ2USDgoGbW9kdWxlGAEgASgJEhMKC3Nl",
"cnZpY2VOYW1lGAIgASgJEgwKBGRhdGEYAyABKAwSDQoFcmVxSWQYBCABKAUi",
"WQoKV1NSZXNwb25zZRITCgttZXNzYWdlVHlwZRgBIAEoCRIMCgRkYXRhGAIg",
"ASgMEg0KBXJlcUlkGAMgASgFEgwKBGNvZGUYBCABKAUSCwoDemlwGAUgASgI",
"QgdaBS4vO3BiYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::WSMessage), global::WSMessage.Parser, new[]{ "Module", "ServiceName", "Data", "ReqId" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::WSResponse), global::WSResponse.Parser, new[]{ "MessageType", "Data", "ReqId", "Code", "Zip" }, null, null, null, null)
}));
}
#endregion
}
#region Messages
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class WSMessage : pb::IMessage<WSMessage>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<WSMessage> _parser = new pb::MessageParser<WSMessage>(() => new WSMessage());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<WSMessage> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::WsReflection.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 WSMessage() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public WSMessage(WSMessage other) : this() {
module_ = other.module_;
serviceName_ = other.serviceName_;
data_ = other.data_;
reqId_ = other.reqId_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public WSMessage Clone() {
return new WSMessage(this);
}
/// <summary>Field number for the "module" field.</summary>
public const int ModuleFieldNumber = 1;
private string module_ = "";
/// <summary>
///模块名称
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Module {
get { return module_; }
set {
module_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "serviceName" field.</summary>
public const int ServiceNameFieldNumber = 2;
private string serviceName_ = "";
/// <summary>
///服务名称
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string ServiceName {
get { return serviceName_; }
set {
serviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "data" field.</summary>
public const int DataFieldNumber = 3;
private pb::ByteString data_ = pb::ByteString.Empty;
/// <summary>
///请求数据
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pb::ByteString Data {
get { return data_; }
set {
data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "reqId" field.</summary>
public const int ReqIdFieldNumber = 4;
private int reqId_;
/// <summary>
///请求id
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int ReqId {
get { return reqId_; }
set {
reqId_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as WSMessage);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(WSMessage other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Module != other.Module) return false;
if (ServiceName != other.ServiceName) return false;
if (Data != other.Data) return false;
if (ReqId != other.ReqId) 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 (Module.Length != 0) hash ^= Module.GetHashCode();
if (ServiceName.Length != 0) hash ^= ServiceName.GetHashCode();
if (Data.Length != 0) hash ^= Data.GetHashCode();
if (ReqId != 0) hash ^= ReqId.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 (Module.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Module);
}
if (ServiceName.Length != 0) {
output.WriteRawTag(18);
output.WriteString(ServiceName);
}
if (Data.Length != 0) {
output.WriteRawTag(26);
output.WriteBytes(Data);
}
if (ReqId != 0) {
output.WriteRawTag(32);
output.WriteInt32(ReqId);
}
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 (Module.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Module);
}
if (ServiceName.Length != 0) {
output.WriteRawTag(18);
output.WriteString(ServiceName);
}
if (Data.Length != 0) {
output.WriteRawTag(26);
output.WriteBytes(Data);
}
if (ReqId != 0) {
output.WriteRawTag(32);
output.WriteInt32(ReqId);
}
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 (Module.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Module);
}
if (ServiceName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(ServiceName);
}
if (Data.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
}
if (ReqId != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReqId);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(WSMessage other) {
if (other == null) {
return;
}
if (other.Module.Length != 0) {
Module = other.Module;
}
if (other.ServiceName.Length != 0) {
ServiceName = other.ServiceName;
}
if (other.Data.Length != 0) {
Data = other.Data;
}
if (other.ReqId != 0) {
ReqId = other.ReqId;
}
_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: {
Module = input.ReadString();
break;
}
case 18: {
ServiceName = input.ReadString();
break;
}
case 26: {
Data = input.ReadBytes();
break;
}
case 32: {
ReqId = 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: {
Module = input.ReadString();
break;
}
case 18: {
ServiceName = input.ReadString();
break;
}
case 26: {
Data = input.ReadBytes();
break;
}
case 32: {
ReqId = input.ReadInt32();
break;
}
}
}
}
#endif
}
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class WSResponse : pb::IMessage<WSResponse>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<WSResponse> _parser = new pb::MessageParser<WSResponse>(() => new WSResponse());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<WSResponse> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::WsReflection.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 WSResponse() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public WSResponse(WSResponse other) : this() {
messageType_ = other.messageType_;
data_ = other.data_;
reqId_ = other.reqId_;
code_ = other.code_;
zip_ = other.zip_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public WSResponse Clone() {
return new WSResponse(this);
}
/// <summary>Field number for the "messageType" field.</summary>
public const int MessageTypeFieldNumber = 1;
private string messageType_ = "";
/// <summary>
///响应消息
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string MessageType {
get { return messageType_; }
set {
messageType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "data" field.</summary>
public const int DataFieldNumber = 2;
private pb::ByteString data_ = pb::ByteString.Empty;
/// <summary>
///响应数据
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pb::ByteString Data {
get { return data_; }
set {
data_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "reqId" field.</summary>
public const int ReqIdFieldNumber = 3;
private int reqId_;
/// <summary>
///请求id
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int ReqId {
get { return reqId_; }
set {
reqId_ = value;
}
}
/// <summary>Field number for the "code" field.</summary>
public const int CodeFieldNumber = 4;
private int code_;
/// <summary>
///响应状态码
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int Code {
get { return code_; }
set {
code_ = value;
}
}
/// <summary>Field number for the "zip" field.</summary>
public const int ZipFieldNumber = 5;
private bool zip_;
/// <summary>
///是否压缩
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Zip {
get { return zip_; }
set {
zip_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as WSResponse);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(WSResponse other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (MessageType != other.MessageType) return false;
if (Data != other.Data) return false;
if (ReqId != other.ReqId) return false;
if (Code != other.Code) return false;
if (Zip != other.Zip) 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 (MessageType.Length != 0) hash ^= MessageType.GetHashCode();
if (Data.Length != 0) hash ^= Data.GetHashCode();
if (ReqId != 0) hash ^= ReqId.GetHashCode();
if (Code != 0) hash ^= Code.GetHashCode();
if (Zip != false) hash ^= Zip.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 (MessageType.Length != 0) {
output.WriteRawTag(10);
output.WriteString(MessageType);
}
if (Data.Length != 0) {
output.WriteRawTag(18);
output.WriteBytes(Data);
}
if (ReqId != 0) {
output.WriteRawTag(24);
output.WriteInt32(ReqId);
}
if (Code != 0) {
output.WriteRawTag(32);
output.WriteInt32(Code);
}
if (Zip != false) {
output.WriteRawTag(40);
output.WriteBool(Zip);
}
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 (MessageType.Length != 0) {
output.WriteRawTag(10);
output.WriteString(MessageType);
}
if (Data.Length != 0) {
output.WriteRawTag(18);
output.WriteBytes(Data);
}
if (ReqId != 0) {
output.WriteRawTag(24);
output.WriteInt32(ReqId);
}
if (Code != 0) {
output.WriteRawTag(32);
output.WriteInt32(Code);
}
if (Zip != false) {
output.WriteRawTag(40);
output.WriteBool(Zip);
}
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 (MessageType.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(MessageType);
}
if (Data.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
}
if (ReqId != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReqId);
}
if (Code != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
}
if (Zip != false) {
size += 1 + 1;
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(WSResponse other) {
if (other == null) {
return;
}
if (other.MessageType.Length != 0) {
MessageType = other.MessageType;
}
if (other.Data.Length != 0) {
Data = other.Data;
}
if (other.ReqId != 0) {
ReqId = other.ReqId;
}
if (other.Code != 0) {
Code = other.Code;
}
if (other.Zip != false) {
Zip = other.Zip;
}
_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: {
MessageType = input.ReadString();
break;
}
case 18: {
Data = input.ReadBytes();
break;
}
case 24: {
ReqId = input.ReadInt32();
break;
}
case 32: {
Code = input.ReadInt32();
break;
}
case 40: {
Zip = input.ReadBool();
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: {
MessageType = input.ReadString();
break;
}
case 18: {
Data = input.ReadBytes();
break;
}
case 24: {
ReqId = input.ReadInt32();
break;
}
case 32: {
Code = input.ReadInt32();
break;
}
case 40: {
Zip = input.ReadBool();
break;
}
}
}
}
#endif
}
#endregion
#endregion Designer generated code

11
Proto/Ws.cs.meta Normal file
View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6d54b057f10017a4d98893bdbd8509e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -27,10 +27,6 @@ public class Role : Fun
if (hp <= 0)
{
die();
//if (Progress_Display.Instance == null) return;
//Progress_Display.Instance.huadongClick(gold);
}
}
}