This commit is contained in:
shurongsen 2024-12-05 16:25:46 +08:00
parent bd7bc9cfad
commit 0dc89a3bef
30 changed files with 250 additions and 23952 deletions

View File

@ -1,281 +0,0 @@
// <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

View File

@ -1,83 +0,0 @@
// <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

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -1,525 +0,0 @@
// <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

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -1,726 +0,0 @@
// <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

View File

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

84
Role/Attack.cs Normal file
View File

@ -0,0 +1,84 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
using UnityEngine;
using Debug = UnityEngine.Debug;
public class Attack : MonoBehaviour
{
[Header("子弹预制体")] public GameObject bulletPrefab;
[Header("子弹数据")] public BulletData bulletData;
[Header("角色对象")] public Role role;
[Header("攻击范围")] public float attackScope;
[Header("攻击类型")] public DamageType damageTyp = DamageType.noAttributeDamage;
public float AttackScope
{
[DebuggerStepThrough]
get => attackScope;
[DebuggerStepThrough]
set
{
attackScope = value;
GetComponent<CircleCollider2D>().radius = attackScope;
}
}
public async void Start()
{
bulletData = new BulletData();
bulletData.BulletScattering = 1;
while (true) {
CircleCollider2D circleCollider2D = GetComponent<CircleCollider2D>();
if (circleCollider2D)
{
Collider2D[] colliders = Physics2D.OverlapCircleAll(transform.position, circleCollider2D.radius);
foreach (Collider2D collider in colliders)
{
Role targetRole = collider.GetComponent<Role>();
if (targetRole && targetRole.camp != role.camp)
{
Debug.Log("检测到碰撞器:" + collider.name);
attack(targetRole);
}
}
await Task.Delay((int)(1000));
}
else
{
return;
}
}
}
public void attack(Role targetRole)
{
if (bulletPrefab==null)
{
Debug.LogError("子弹预制体为空");
return;
}
Vector2 direction = (targetRole.transform.position - transform.position).normalized;
List<GameObject> bulltes= new List<GameObject>();
for (int i = 0; i < bulletData.BulletScattering; i++)
{
//改变子弹方向,更具角色自身的攻击范围来计算,
GameObject BulletGamobj = GameObject.Instantiate(bulletPrefab, this.transform.root);
BulletGamobj.GetComponent<Bullet>().role = role;
BulletGamobj.GetComponent<Bullet>().attackObj = this ;
BulletGamobj.transform.up = direction;
BulletGamobj.transform.position = transform.position;
bulltes.Add(BulletGamobj);
}
Debug.Log(bulltes.Count);
//foreach (GameObject bullet in bulltes)
//{
//}
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 013d659005f08544cafe01b5a18e6072
guid: 90e9cd2fc0a74084fbf1a89015db94a9
MonoImporter:
externalObjects: {}
serializedVersion: 2

96
Role/Bullet.cs Normal file
View File

@ -0,0 +1,96 @@
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UIElements;
public enum BulletType
{
Bullet,
Lightning
}
public enum BulletMoveType
{/// <summary>
/// 子弹移动方式:点对点,
/// </summary>
PeerToPeer,
/// <summary>
/// 方向移动
/// </summary>
PointToDirection
}
public class BulletData
{
[Header("子弹穿透次数")] public int NumberOfBulletPenetrations = 1;
/// <summary>
/// 子弹散射次数
/// </summary>
[Header("子弹散射次数")] public int BulletScattering = 1;
[Header("子弹连发次数")] public int BulletBurstTimes = 1;
[Header("子弹连发间隔")] public float BulletBurstInterval ;
[Header("子弹穿透衰减")] public float BulletPenetrationAttenuation = 0.2f;
[Header("子弹飞行速度")] public float BulletSpeed = 10f;
[Header("子弹攻击冷却")] public float BulletAttackCooldown = 1f;
[Header("子弹伤害")] public float attack = 0;
public BulletData()
{
}
public BulletData(int numberOfBulletPenetrations, int bulletScattering, int bulletBurstTimes, float bulletBurstInterval, float bulletPenetrationAttenuation, float bulletSpeed, float bulletAttackCooldown)
{
NumberOfBulletPenetrations = numberOfBulletPenetrations;
BulletScattering = bulletScattering;
BulletBurstTimes = bulletBurstTimes;
BulletBurstInterval = bulletBurstInterval;
BulletPenetrationAttenuation = bulletPenetrationAttenuation;
BulletSpeed = bulletSpeed;
BulletAttackCooldown = bulletAttackCooldown;
}
public override string ToString()
{
return
$"{nameof(NumberOfBulletPenetrations)}: {NumberOfBulletPenetrations}, {nameof(BulletScattering)}: {BulletScattering}, {nameof(BulletBurstTimes)}: {BulletBurstTimes}, {nameof(BulletBurstInterval)}: {BulletBurstInterval}, {nameof(BulletPenetrationAttenuation)}: {BulletPenetrationAttenuation}, {nameof(BulletSpeed)}: {BulletSpeed}, {nameof(BulletAttackCooldown)}: {BulletAttackCooldown}";
}
}
public class Bullet : MonoBehaviour
{
[Header("子弹发射角色对象")] public Role role;
[Header("子弹发射范围对象")] public Attack attackObj;
[Header("子弹类型")]public BulletType myBulletType;
[Header("攻击类型")]public BulletMoveType bulletMoveType;
[Header("子弹数据")] public BulletData bulletData;
private void Update()
{
switch (this.bulletMoveType)
{
//更具子弹的移动方式来移动
case BulletMoveType.PeerToPeer:
this.gameObject.transform.Translate(Vector3.up);
break;
case BulletMoveType.PointToDirection:
break;
}
}
private async void Start()
{
await Task.Delay(1000);
Destroy(gameObject);
}
private void OnTriggerEnter2D(Collider2D collision)
{
Role Crole = collision.gameObject.GetComponent<Role>();
if(Crole)
{
if(Crole.camp!= role.camp)
{
Crole.bloodLoss(new object[] { Crole, role.Attack + bulletData.attack, attackObj.damageTyp, role });
}
}
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8f08a6ce1ce72944ab924e71bac47c6f
guid: 25a4f829952155e48bbe3abf99b78f2e
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -6,9 +6,18 @@ using UnityEngine;
public enum DamageType
{
physicalDamage,//物理伤害
magicDamage,//魔法伤害
noAttributeDamage,//无属性伤害
/// <summary>
/// 物理伤害
/// </summary>
physicalDamage,
/// <summary>
/// 魔法伤害
/// </summary>
magicDamage,
/// <summary>
/// 无属性伤害
/// </summary>
noAttributeDamage,
}
//public class prefabObjects

View File

@ -2,13 +2,31 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.UIElements;
using Debug = UnityEngine.Debug;
using Image = UnityEngine.UI.Image;
public enum Camp
{/// <summary>
/// 鯤소
/// </summary>
Player,
/// <summary>
/// 밍膠
/// </summary>
Enemy,
/// <summary>
/// 櫓접
/// </summary>
Neutral
}
/// <summary>
/// 角色基类,玩家处理事件
@ -16,8 +34,8 @@ using Debug = UnityEngine.Debug;
[ExecuteInEditMode]
public class Role : Fun
{
[Header("黎檀")] public Camp camp ;
[Header("血量")] public float hp = 100f;//血量
[Header("µôÂä")] public float gold = 10f;
public float Hp
{
get => hp;
@ -30,13 +48,30 @@ public class Role : Fun
}
}
}
[Header("딜쭝")] public float gold = 10f;
public float Gold
{
[DebuggerStepThrough]
get => gold;
[DebuggerStepThrough]
set => gold = value;
}
[Header("묑샌제")] private float attack = 10f;
public float Attack
{
get => attack;
set => attack = value;
}
[Header("된섬")] private int level = 1;
public int Level
{
[DebuggerStepThrough] get => level;
[DebuggerStepThrough] set => level = value;
}
[Header("物理护甲")] public int physicalArmor = 10;//物理护甲
[Header("魔法护甲")] public int magicArmor = 5;//魔法护甲
public List<BUff> buffList = new List<BUff>();
[Header("导航组件")] public SimplePathfindingDoTween Navigation;
[System.Serializable ]
public class AnimationList//动画list
{
@ -53,17 +88,27 @@ public class Role : Fun
public event AnimationItem OnAnimationIng;
public event AnimationItem OnAnimationEnd;
[Header("动画是否正常播放")] public bool isAnimationPlay = false;//动画是否正常播放
[Header("툭旒竟")]public CircleCollider2D mycollider;
[Header("묑샌신굶")] public Attack attackClass;
async void Start()
{
if (Application.isPlaying)
{
if (attackClass)
{
attackClass.role = this;
}
UpdateBuff();
Navigation.MoveToNextWaypoint(gameObject);
//Navigation.MoveToNextWaypoint(gameObject);
}
tag = Enum.GetName(typeof(Camp), camp);
updateAnimation();
//AttackScope=1f;
}
/// <summary>
/// 角色动画更新
@ -113,6 +158,7 @@ public class Role : Fun
OnAnimationEnd?.Invoke(animationHighlight);
}
}
/// <summary>
/// 角色死亡
/// </summary>
@ -168,4 +214,6 @@ public class Role : Fun
}
}