feat: 添加测试handler,danmaku原样返回。

main
NorthLan 3 years ago
parent 0cf2f7e5a2
commit 0a7c9af217

@ -13,7 +13,7 @@ type TestGameLogic struct {
func NewTestLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic { func NewTestLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic {
resp := &TestGameLogic{ resp := &TestGameLogic{
svcCtx: svcCtx, svcCtx: svcCtx,
LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHG, nil), LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_TEST, nil),
} }
return resp.LiveGameLogic return resp.LiveGameLogic
} }

@ -28,9 +28,9 @@ namespace Pb.Room {
"TGl2ZVJvb21JZBgBIAEoAxIjCghHYW1lVHlwZRgCIAEoDjIRLnBiLnJvb20u", "TGl2ZVJvb21JZBgBIAEoAxIjCghHYW1lVHlwZRgCIAEoDjIRLnBiLnJvb20u",
"R2FtZVR5cGUiLAoMSm9pblJvb21SZXNwEgwKBENvZGUYASABKAMSDgoGUmVz", "R2FtZVR5cGUiLAoMSm9pblJvb21SZXNwEgwKBENvZGUYASABKAMSDgoGUmVz",
"dWx0GAIgASgJIjkKBkNsaWVudBIKCgJJZBgBIAEoAxIjCghHYW1lVHlwZRgC", "dWx0GAIgASgJIjkKBkNsaWVudBIKCgJJZBgBIAEoAxIjCghHYW1lVHlwZRgC",
"IAEoDjIRLnBiLnJvb20uR2FtZVR5cGUqNAoIR2FtZVR5cGUSBwoDWkhHEAAS", "IAEoDjIRLnBiLnJvb20uR2FtZVR5cGUqPgoIR2FtZVR5cGUSBwoDWkhHEAAS",
"CQoFWkhHSFoQARIJCgVaSEdGQhACEgkKBVpIR1pEEANCGVoXZGNnL2dhbWUv", "CQoFWkhHSFoQARIJCgVaSEdGQhACEgkKBVpIR1pEEAMSCAoEVEVTVBAKQhla",
"cGIvcm9vbTtwYlJvb21iBnByb3RvMw==")); "F2RjZy9nYW1lL3BiL3Jvb207cGJSb29tYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Room.GameType), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Room.GameType), }, null, new pbr::GeneratedClrTypeInfo[] {
@ -63,6 +63,10 @@ namespace Pb.Room {
/// 指挥官-阵地 /// 指挥官-阵地
/// </summary> /// </summary>
[pbr::OriginalName("ZHGZD")] Zhgzd = 3, [pbr::OriginalName("ZHGZD")] Zhgzd = 3,
/// <summary>
/// 测试
/// </summary>
[pbr::OriginalName("TEST")] Test = 10,
} }
#endregion #endregion

@ -28,6 +28,7 @@ const (
GameType_ZHGHZ GameType = 1 // 指挥官-海战 GameType_ZHGHZ GameType = 1 // 指挥官-海战
GameType_ZHGFB GameType = 2 // 指挥官-副本 GameType_ZHGFB GameType = 2 // 指挥官-副本
GameType_ZHGZD GameType = 3 // 指挥官-阵地 GameType_ZHGZD GameType = 3 // 指挥官-阵地
GameType_TEST GameType = 10 // 测试
) )
// Enum value maps for GameType. // Enum value maps for GameType.
@ -37,12 +38,14 @@ var (
1: "ZHGHZ", 1: "ZHGHZ",
2: "ZHGFB", 2: "ZHGFB",
3: "ZHGZD", 3: "ZHGZD",
10: "TEST",
} }
GameType_value = map[string]int32{ GameType_value = map[string]int32{
"ZHG": 0, "ZHG": 0,
"ZHGHZ": 1, "ZHGHZ": 1,
"ZHGFB": 2, "ZHGFB": 2,
"ZHGZD": 3, "ZHGZD": 3,
"TEST": 10,
} }
) )
@ -256,13 +259,13 @@ var file_room_room_proto_rawDesc = []byte{
0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x2d,
0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x54,
0x79, 0x70, 0x65, 0x52, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x34, 0x0a, 0x79, 0x70, 0x65, 0x52, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x3e, 0x0a,
0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x5a, 0x48, 0x47, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x5a, 0x48, 0x47,
0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x5a, 0x48, 0x47, 0x48, 0x5a, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x5a, 0x48, 0x47, 0x48, 0x5a, 0x10, 0x01, 0x12, 0x09, 0x0a,
0x05, 0x5a, 0x48, 0x47, 0x46, 0x42, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x5a, 0x48, 0x47, 0x5a, 0x05, 0x5a, 0x48, 0x47, 0x46, 0x42, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x5a, 0x48, 0x47, 0x5a,
0x44, 0x10, 0x03, 0x42, 0x19, 0x5a, 0x17, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x44, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x53, 0x54, 0x10, 0x0a, 0x42, 0x19, 0x5a,
0x70, 0x62, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x3b, 0x70, 0x62, 0x52, 0x6f, 0x6f, 0x6d, 0x62, 0x06, 0x17, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x72, 0x6f, 0x6f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6d, 0x3b, 0x70, 0x62, 0x52, 0x6f, 0x6f, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

@ -10,6 +10,7 @@ enum GameType {
ZHGHZ = 1; // - ZHGHZ = 1; // -
ZHGFB = 2; // - ZHGFB = 2; // -
ZHGZD = 3; // - ZHGZD = 3; // -
TEST = 10; //
} }
message JoinRoomReq { message JoinRoomReq {

Loading…
Cancel
Save