From e19145bc23fc2cd08a36ef1166f3d37d762e5a73 Mon Sep 17 00:00:00 2001 From: sin365 <353374337@qq.com> Date: Tue, 7 Jan 2025 01:08:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=B1=BB=E5=9E=8B=E5=92=8C=E6=89=8B=E6=9F=84?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=A6=82=E5=BF=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Script/AppMain/Manager/AppLogin.cs | 41 +- .../Assets/Script/AppMain/Manager/AppRoom.cs | 32 +- .../Protobuf/ProtobufAxibugEmuOnline.cs | 392 +++++++++++++----- .../Script/AppMain/UI/InGameUI/InGameUI.cs | 9 +- .../UI/XMBTopGroupUI/ControllerInfoPanel.cs | 7 +- 5 files changed, 369 insertions(+), 112 deletions(-) diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppLogin.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppLogin.cs index 2c5689f7..9fbd69c3 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppLogin.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppLogin.cs @@ -25,14 +25,37 @@ namespace AxibugEmuOnline.Client.Manager App.user.userdata.Account = LastLoginGuid; AxibugProtobuf.DeviceType devType; - if (Application.platform == RuntimePlatform.PSP2) - devType = AxibugProtobuf.DeviceType.Psv; - else if (Application.platform == RuntimePlatform.Android) - devType = AxibugProtobuf.DeviceType.Android; - else if (Application.platform == RuntimePlatform.IPhonePlayer) - devType = AxibugProtobuf.DeviceType.Ios; - else - devType = AxibugProtobuf.DeviceType.Pc; + switch (Application.platform) + { + case RuntimePlatform.PSP2: + devType = AxibugProtobuf.DeviceType.Psv; + break; + case RuntimePlatform.PS4: + devType = AxibugProtobuf.DeviceType.Ps4; + break; + case RuntimePlatform.PS3: + devType = AxibugProtobuf.DeviceType.Ps3; + break; + case RuntimePlatform.WiiU: + devType = AxibugProtobuf.DeviceType.WiiU; + break; + case RuntimePlatform.XBOX360: + devType = AxibugProtobuf.DeviceType.Xbox360; + break; + case RuntimePlatform.XboxOne: + case RuntimePlatform.GameCoreXboxOne: + devType = AxibugProtobuf.DeviceType.Xboxone; + break; + //case RuntimePlatform.: + // devType = AxibugProtobuf.DeviceType.Nintendo3Ds; + // break; + case RuntimePlatform.IPhonePlayer: + devType = AxibugProtobuf.DeviceType.Ios; + break; + default: + devType = AxibugProtobuf.DeviceType.Pc; + break; + } Protobuf_Login msg = new Protobuf_Login() { @@ -63,7 +86,7 @@ namespace AxibugEmuOnline.Client.Manager } else { - App.log.Info("登录失败"); + App.log.Info("登录失败"); OverlayManager.PopTip("登录失败"); Eventer.Instance.PostEvent(EEvent.OnLoginFailed); } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs index 2331c34c..efc85db7 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs @@ -412,20 +412,19 @@ namespace AxibugEmuOnline.Client.Manager /// 发送修改玩家槽位,但是增量 /// /// 玩家占用房间GamePlaySlot和LocalJoyIdx字典 - public void SendChangePlaySlotIdxWithJoyIdx(uint localJoyIndex, uint slotIndex) + public void SendChangePlaySlotIdxWithJoyIdx(uint localJoyIndex, uint slotIndex, GamePadType localGamePadType) { if (!App.roomMgr.InRoom) return; - Dictionary temp = new Dictionary(); + Dictionary> temp = new Dictionary>(); for (int i = 0; i < App.roomMgr.mineRoomMiniInfo.GamePlaySlotList.Count; i++) { var item = App.roomMgr.mineRoomMiniInfo.GamePlaySlotList[i]; - if (item.PlayerUID <= 0) continue; if (item.PlayerUID != App.user.userdata.UID) return; - temp[(uint)i] = (uint)item.PlayerLocalJoyIdx; + temp[(uint)i] = new ValueTuple((uint)item.PlayerLocalJoyIdx, item.PlayerLocalGamePadType); } - temp[slotIndex] = localJoyIndex; + temp[slotIndex] = new ValueTuple(localJoyIndex, localGamePadType); SendChangePlaySlotIdxWithJoyIdx(temp); } @@ -433,7 +432,7 @@ namespace AxibugEmuOnline.Client.Manager /// 发送修改玩家槽位,全量 /// /// 玩家占用房间GamePlaySlot和LocalJoyIdx字典 - public void SendChangePlaySlotIdxWithJoyIdx(Dictionary dictSlotIdx2LocalJoyIdx) + public void SendChangePlaySlotIdxWithJoyIdx(Dictionary> dictSlotIdx2LocalJoyIdx) { if (!InRoom) return; @@ -445,7 +444,8 @@ namespace AxibugEmuOnline.Client.Manager _Protobuf_Room_Change_PlaySlotWithJoy.SlotWithJoy.Add(new Protobuf_PlaySlotIdxWithJoyIdx() { PlayerSlotIdx = (int)slotdata.Key, - PlayerLocalJoyIdx = (int)slotdata.Value, + PlayerLocalJoyIdx = (int)slotdata.Value.Item1, + PlayerLocalGamePadType = slotdata.Value.Item2, }); } @@ -605,6 +605,24 @@ namespace AxibugEmuOnline.Client.Manager if (roomMiniInfo.GamePlaySlotList[(int)GameSlotIdx].PlayerUID > 0) PlayerName = roomMiniInfo.GamePlaySlotList[(int)GameSlotIdx].PlayerNickName; return string.IsNullOrEmpty(PlayerName); + } + + /// + /// 获取玩家手柄类型 + /// + /// + /// + /// + /// + public static bool GetPlayerGamePadTypeByPlayerIdx(this Protobuf_Room_MiniInfo roomMiniInfo, uint GameSlotIdx, out GamePadType gamePadType) + { + if (roomMiniInfo.GamePlaySlotList[(int)GameSlotIdx].PlayerUID > 0) + { + gamePadType = roomMiniInfo.GamePlaySlotList[(int)GameSlotIdx].PlayerLocalGamePadType; + return true; + } + gamePadType = GamePadType.GlobalGamePad; + return false; } } } \ No newline at end of file diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs index b64bcb2f..23109b91 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Protobuf/ProtobufAxibugEmuOnline.cs @@ -42,95 +42,109 @@ namespace AxibugProtobuf { "X1VzZXJKb2luX1JFU1ASLgoIVXNlckluZm8YASABKAsyHC5BeGlidWdQcm90", "b2J1Zi5Vc2VyTWluaUluZm8iJgoXUHJvdG9idWZfVXNlckxlYXZlX1JFU1AS", "CwoDVUlEGAEgASgDIjUKF1Byb3RvYnVmX1VzZXJTdGF0ZV9SRVNQEgsKA1VJ", - "RBgBIAEoAxINCgVTdGF0ZRgCIAEoBSItCgxVc2VyTWluaUluZm8SCwoDVUlE", - "GAEgASgDEhAKCE5pY2tOYW1lGAIgASgJIiwKGFByb3RvYnVmX01vZGlmeV9O", - "aWNrTmFtZRIQCghOaWNrTmFtZRgBIAEoCSIfCh1Qcm90b2J1Zl9Nb2RpZnlf", - "Tmlja05hbWVfUkVTUCJPCh1Qcm90b2J1Zl9VcGRhdGVfVXNlckluZm9fUkVT", - "UBIuCghVc2VySW5mbxgBIAEoCzIcLkF4aWJ1Z1Byb3RvYnVmLlVzZXJNaW5p", - "SW5mbyJhCiJQcm90b2J1Zl9VcGRhdGVfT3RoZXJVc2VySW5mb19SRVNQEgsK", - "A1VJRBgBIAEoAxIuCghVc2VySW5mbxgCIAEoCzIcLkF4aWJ1Z1Byb3RvYnVm", - "LlVzZXJNaW5pSW5mbyIUChJQcm90b2J1Zl9Sb29tX0xpc3QiWwoXUHJvdG9i", - "dWZfUm9vbV9MaXN0X1JFU1ASQAoQUm9vbU1pbmlJbmZvTGlzdBgBIAMoCzIm", - "LkF4aWJ1Z1Byb3RvYnVmLlByb3RvYnVmX1Jvb21fTWluaUluZm8ikAIKFlBy", - "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+ "ENgoEiAKG0NNRF9Sb29tX1NpbmdlbF9QbGF5ZXJJbnB1dBD6LhIdChhDTURf", + "Uk9PTV9TWU5fUGxheWVySW5wdXQQ/y4SDwoKQ01EX1NjcmVlbhDZNhISCg1D", + "TURfR0FNRV9NQVJLEPVOKtABCglFcnJvckNvZGUSEAoMRVJST1JfREVGQVVM", + "EAASDAoIRVJST1JfT0sQARIYChRFUlJPUl9ST09NX05PVF9GT1VORBAKEicK", + "I0VSUk9SX1JPT01fU0xPVF9BTFJFQURMWV9IQURfUExBWUVSEAsSIQodRVJS", + "T1JfUk9PTV9DQU5UX0RPX0NVUlJfU1RBVEUQMhIfChpFUlJPUl9ST01fQUxS", + "RUFEWV9IQURfU1RBUhCTAxIcChdFUlJPUl9ST01fRE9OVF9IQURfU1RBUhCU", + "AypACglMb2dpblR5cGUSDQoJVXNlRGV2aWNlEAASDgoKVXNlQWNjb3VudBAB", + "EhQKEFVzZUhhb1l1ZUFjY291bnQQAiqSAQoKRGV2aWNlVHlwZRIWChJEZXZp", + "Y2VUeXBlX0RlZmF1bHQQABIGCgJQQxABEgsKB0FuZHJvaWQQAhIHCgNJT1MQ", + "AxIHCgNQU1YQBBIHCgNQUzMQBRIHCgNQUzQQBhILCgdYQk9YMzYwEAcSCwoH", + "WEJPWE9ORRAIEggKBFdpaVUQCRIPCgtOaW50ZW5kbzNEUxAKKpMCCgtHYW1l", + "UGFkVHlwZRIMCghLZXlib2FyZBAAEhEKDUdsb2JhbEdhbWVQYWQQARIOCgpU", + "b3VjaFBhbmVsEAISDgoKRFMzQ29udHJvbBADEg4KCkRTNENvbnRyb2wQBBIO", + "CgpEUzVDb250cm9sEAUSFAoQU3dpdGNoUHJvQ29udHJvbBAGEhAKDFN3aXRj", + "aEpveUNvbhAHEhIKDlhCT1gzNjBDb250cm9sEAgSEgoOWEJPWE9ORUNvbnRy", + "b2wQCRIRCg1QU1ZpdGFDb250cm9sEAoSEgoOV2lpVVBhZENvbnRyb2wQCxIU", + "ChBXaWlSZW1vdGVDb250cm9sEAwSFgoSTmludGVuZG8zRFNDb250cm9sEA0q", + "ZAoMUGxhdGZvcm1UeXBlEgcKA0FsbBAAEgcKA05lcxABEhEKDU1hc3Rlcl9T", + "eXN0ZW0QAhINCglHYW1lX0dlYXIQAxIMCghHYW1lX0JveRAEEhIKDkdhbWVf", + "Qm95X0NvbG9yEAUqcAoNUm9vbUdhbWVTdGF0ZRISCg5Ob25lX0dhbWVTdGF0", + "ZRAAEgwKCE9ubHlIb3N0EAESEQoNV2FpdFJhd1VwZGF0ZRACEg0KCVdhaXRS", + "ZWFkeRADEgkKBVBhdXNlEAQSEAoMSW5PbmxpbmVHYW1lEAUqTgoRTG9naW5S", + "ZXN1bHRTdGF0dXMSIQodTG9naW5SZXN1bHRTdGF0dXNfQmFzZURlZmF1bHQQ", + "ABIGCgJPSxABEg4KCkFjY291bnRFcnIQAkICSAFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.PlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::AxibugProtobuf.CommandID), typeof(global::AxibugProtobuf.ErrorCode), typeof(global::AxibugProtobuf.LoginType), typeof(global::AxibugProtobuf.DeviceType), typeof(global::AxibugProtobuf.GamePadType), typeof(global::AxibugProtobuf.PlatformType), typeof(global::AxibugProtobuf.RoomGameState), typeof(global::AxibugProtobuf.LoginResultStatus), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg), global::AxibugProtobuf.Protobuf_ChatMsg.Parser, new[]{ "ChatMsg" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_ChatMsg_RESP), global::AxibugProtobuf.Protobuf_ChatMsg_RESP.Parser, new[]{ "NickName", "ChatMsg", "Date" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Ping), global::AxibugProtobuf.Protobuf_Ping.Parser, new[]{ "Seed" }, null, null, null, null), @@ -142,7 +156,7 @@ namespace AxibugProtobuf { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_UserJoin_RESP), global::AxibugProtobuf.Protobuf_UserJoin_RESP.Parser, new[]{ "UserInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_UserLeave_RESP), global::AxibugProtobuf.Protobuf_UserLeave_RESP.Parser, new[]{ "UID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_UserState_RESP), global::AxibugProtobuf.Protobuf_UserState_RESP.Parser, new[]{ "UID", "State" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.UserMiniInfo), global::AxibugProtobuf.UserMiniInfo.Parser, new[]{ "UID", "NickName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.UserMiniInfo), global::AxibugProtobuf.UserMiniInfo.Parser, new[]{ "UID", "NickName", "DeviceType" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Modify_NickName), global::AxibugProtobuf.Protobuf_Modify_NickName.Parser, new[]{ "NickName" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Modify_NickName_RESP), global::AxibugProtobuf.Protobuf_Modify_NickName_RESP.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Update_UserInfo_RESP), global::AxibugProtobuf.Protobuf_Update_UserInfo_RESP.Parser, new[]{ "UserInfo" }, null, null, null, null), @@ -150,7 +164,7 @@ namespace AxibugProtobuf { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_List), global::AxibugProtobuf.Protobuf_Room_List.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_List_RESP), global::AxibugProtobuf.Protobuf_Room_List_RESP.Parser, new[]{ "RoomMiniInfoList" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_MiniInfo), global::AxibugProtobuf.Protobuf_Room_MiniInfo.Parser, new[]{ "RoomID", "GameRomID", "GameRomHash", "HostPlayerUID", "GameState", "ObsUserCount", "ScreenProviderUID", "GamePlaySlotList" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_GamePlaySlot), global::AxibugProtobuf.Protobuf_Room_GamePlaySlot.Parser, new[]{ "PlayerUID", "PlayerNickName", "PlayerLocalJoyIdx" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_GamePlaySlot), global::AxibugProtobuf.Protobuf_Room_GamePlaySlot.Parser, new[]{ "PlayerUID", "PlayerNickName", "DeviceType", "PlayerLocalJoyIdx", "PlayerLocalGamePadType" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Update_RESP), global::AxibugProtobuf.Protobuf_Room_Update_RESP.Parser, new[]{ "UpdateType", "RoomMiniInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Screnn_Frame), global::AxibugProtobuf.Protobuf_Screnn_Frame.Parser, new[]{ "RoomID", "FrameID", "RawBitmap" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_SinglePlayerInputData), global::AxibugProtobuf.Protobuf_Room_SinglePlayerInputData.Parser, new[]{ "FrameID", "InputData" }, null, null, null, null), @@ -163,7 +177,7 @@ namespace AxibugProtobuf { new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Leave_RESP), global::AxibugProtobuf.Protobuf_Room_Leave_RESP.Parser, new[]{ "RoomID" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_MyRoom_State_Change), global::AxibugProtobuf.Protobuf_Room_MyRoom_State_Change.Parser, new[]{ "RoomMiniInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Change_PlaySlotWithJoy), global::AxibugProtobuf.Protobuf_Room_Change_PlaySlotWithJoy.Parser, new[]{ "SlotWithJoy" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_PlaySlotIdxWithJoyIdx), global::AxibugProtobuf.Protobuf_PlaySlotIdxWithJoyIdx.Parser, new[]{ "PlayerSlotIdx", "PlayerLocalJoyIdx" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_PlaySlotIdxWithJoyIdx), global::AxibugProtobuf.Protobuf_PlaySlotIdxWithJoyIdx.Parser, new[]{ "PlayerSlotIdx", "PlayerLocalJoyIdx", "PlayerLocalGamePadType" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_Change_PlaySlotWithJoy_RESP), global::AxibugProtobuf.Protobuf_Room_Change_PlaySlotWithJoy_RESP.Parser, null, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP), global::AxibugProtobuf.Protobuf_Room_WaitStep_RESP.Parser, new[]{ "WaitStep", "LoadStateRaw" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw), global::AxibugProtobuf.Protobuf_Room_HostPlayer_UpdateStateRaw.Parser, new[]{ "LoadStateRaw" }, null, null, null, null), @@ -363,11 +377,47 @@ namespace AxibugProtobuf { [pbr::OriginalName("Android")] Android = 2, [pbr::OriginalName("IOS")] Ios = 3, [pbr::OriginalName("PSV")] Psv = 4, + [pbr::OriginalName("PS3")] Ps3 = 5, + [pbr::OriginalName("PS4")] Ps4 = 6, + [pbr::OriginalName("XBOX360")] Xbox360 = 7, + [pbr::OriginalName("XBOXONE")] Xboxone = 8, + [pbr::OriginalName("WiiU")] WiiU = 9, + [pbr::OriginalName("Nintendo3DS")] Nintendo3Ds = 10, + } + + public enum GamePadType { + /// + ///键盘 + /// + [pbr::OriginalName("Keyboard")] Keyboard = 0, + /// + ///通用手柄 + /// + [pbr::OriginalName("GlobalGamePad")] GlobalGamePad = 1, + /// + ///触屏 + /// + [pbr::OriginalName("TouchPanel")] TouchPanel = 2, + [pbr::OriginalName("DS3Control")] Ds3Control = 3, + [pbr::OriginalName("DS4Control")] Ds4Control = 4, + [pbr::OriginalName("DS5Control")] Ds5Control = 5, + [pbr::OriginalName("SwitchProControl")] SwitchProControl = 6, + [pbr::OriginalName("SwitchJoyCon")] SwitchJoyCon = 7, + [pbr::OriginalName("XBOX360Control")] Xbox360Control = 8, + [pbr::OriginalName("XBOXONEControl")] Xboxonecontrol = 9, + [pbr::OriginalName("PSVitaControl")] PsvitaControl = 10, + [pbr::OriginalName("WiiUPadControl")] WiiUpadControl = 11, + [pbr::OriginalName("WiiRemoteControl")] WiiRemoteControl = 12, + [pbr::OriginalName("Nintendo3DSControl")] Nintendo3Dscontrol = 13, } public enum PlatformType { [pbr::OriginalName("All")] All = 0, [pbr::OriginalName("Nes")] Nes = 1, + [pbr::OriginalName("Master_System")] MasterSystem = 2, + [pbr::OriginalName("Game_Gear")] GameGear = 3, + [pbr::OriginalName("Game_Boy")] GameBoy = 4, + [pbr::OriginalName("Game_Boy_Color")] GameBoyColor = 5, } public enum RoomGameState { @@ -2855,6 +2905,7 @@ namespace AxibugProtobuf { public UserMiniInfo(UserMiniInfo other) : this() { uID_ = other.uID_; nickName_ = other.nickName_; + deviceType_ = other.deviceType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -2891,6 +2942,20 @@ namespace AxibugProtobuf { } } + /// Field number for the "deviceType" field. + public const int DeviceTypeFieldNumber = 3; + private global::AxibugProtobuf.DeviceType deviceType_ = global::AxibugProtobuf.DeviceType.Default; + /// + ///设备类型 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::AxibugProtobuf.DeviceType DeviceType { + get { return deviceType_; } + set { + deviceType_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as UserMiniInfo); @@ -2906,6 +2971,7 @@ namespace AxibugProtobuf { } if (UID != other.UID) return false; if (NickName != other.NickName) return false; + if (DeviceType != other.DeviceType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -2914,6 +2980,7 @@ namespace AxibugProtobuf { int hash = 1; if (UID != 0L) hash ^= UID.GetHashCode(); if (NickName.Length != 0) hash ^= NickName.GetHashCode(); + if (DeviceType != global::AxibugProtobuf.DeviceType.Default) hash ^= DeviceType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2938,6 +3005,10 @@ namespace AxibugProtobuf { output.WriteRawTag(18); output.WriteString(NickName); } + if (DeviceType != global::AxibugProtobuf.DeviceType.Default) { + output.WriteRawTag(24); + output.WriteEnum((int) DeviceType); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -2955,6 +3026,10 @@ namespace AxibugProtobuf { output.WriteRawTag(18); output.WriteString(NickName); } + if (DeviceType != global::AxibugProtobuf.DeviceType.Default) { + output.WriteRawTag(24); + output.WriteEnum((int) DeviceType); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -2970,6 +3045,9 @@ namespace AxibugProtobuf { if (NickName.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(NickName); } + if (DeviceType != global::AxibugProtobuf.DeviceType.Default) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceType); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -2987,6 +3065,9 @@ namespace AxibugProtobuf { if (other.NickName.Length != 0) { NickName = other.NickName; } + if (other.DeviceType != global::AxibugProtobuf.DeviceType.Default) { + DeviceType = other.DeviceType; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -3009,6 +3090,10 @@ namespace AxibugProtobuf { NickName = input.ReadString(); break; } + case 24: { + DeviceType = (global::AxibugProtobuf.DeviceType) input.ReadEnum(); + break; + } } } #endif @@ -3031,6 +3116,10 @@ namespace AxibugProtobuf { NickName = input.ReadString(); break; } + case 24: { + DeviceType = (global::AxibugProtobuf.DeviceType) input.ReadEnum(); + break; + } } } } @@ -4533,7 +4622,9 @@ namespace AxibugProtobuf { public Protobuf_Room_GamePlaySlot(Protobuf_Room_GamePlaySlot other) : this() { playerUID_ = other.playerUID_; playerNickName_ = other.playerNickName_; + deviceType_ = other.deviceType_; playerLocalJoyIdx_ = other.playerLocalJoyIdx_; + playerLocalGamePadType_ = other.playerLocalGamePadType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -4570,8 +4661,22 @@ namespace AxibugProtobuf { } } + /// Field number for the "deviceType" field. + public const int DeviceTypeFieldNumber = 3; + private global::AxibugProtobuf.DeviceType deviceType_ = global::AxibugProtobuf.DeviceType.Default; + /// + ///用户设备类型 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::AxibugProtobuf.DeviceType DeviceType { + get { return deviceType_; } + set { + deviceType_ = value; + } + } + /// Field number for the "PlayerLocalJoyIdx" field. - public const int PlayerLocalJoyIdxFieldNumber = 3; + public const int PlayerLocalJoyIdxFieldNumber = 4; private int playerLocalJoyIdx_; /// ///客户端JoyIdx @@ -4584,6 +4689,20 @@ namespace AxibugProtobuf { } } + /// Field number for the "PlayerLocalGamePadType" field. + public const int PlayerLocalGamePadTypeFieldNumber = 5; + private global::AxibugProtobuf.GamePadType playerLocalGamePadType_ = global::AxibugProtobuf.GamePadType.Keyboard; + /// + ///客户端手柄类型 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::AxibugProtobuf.GamePadType PlayerLocalGamePadType { + get { return playerLocalGamePadType_; } + set { + playerLocalGamePadType_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_Room_GamePlaySlot); @@ -4599,7 +4718,9 @@ namespace AxibugProtobuf { } if (PlayerUID != other.PlayerUID) return false; if (PlayerNickName != other.PlayerNickName) return false; + if (DeviceType != other.DeviceType) return false; if (PlayerLocalJoyIdx != other.PlayerLocalJoyIdx) return false; + if (PlayerLocalGamePadType != other.PlayerLocalGamePadType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -4608,7 +4729,9 @@ namespace AxibugProtobuf { int hash = 1; if (PlayerUID != 0L) hash ^= PlayerUID.GetHashCode(); if (PlayerNickName.Length != 0) hash ^= PlayerNickName.GetHashCode(); + if (DeviceType != global::AxibugProtobuf.DeviceType.Default) hash ^= DeviceType.GetHashCode(); if (PlayerLocalJoyIdx != 0) hash ^= PlayerLocalJoyIdx.GetHashCode(); + if (PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) hash ^= PlayerLocalGamePadType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4633,10 +4756,18 @@ namespace AxibugProtobuf { output.WriteRawTag(18); output.WriteString(PlayerNickName); } - if (PlayerLocalJoyIdx != 0) { + if (DeviceType != global::AxibugProtobuf.DeviceType.Default) { output.WriteRawTag(24); + output.WriteEnum((int) DeviceType); + } + if (PlayerLocalJoyIdx != 0) { + output.WriteRawTag(32); output.WriteInt32(PlayerLocalJoyIdx); } + if (PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) { + output.WriteRawTag(40); + output.WriteEnum((int) PlayerLocalGamePadType); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -4654,10 +4785,18 @@ namespace AxibugProtobuf { output.WriteRawTag(18); output.WriteString(PlayerNickName); } - if (PlayerLocalJoyIdx != 0) { + if (DeviceType != global::AxibugProtobuf.DeviceType.Default) { output.WriteRawTag(24); + output.WriteEnum((int) DeviceType); + } + if (PlayerLocalJoyIdx != 0) { + output.WriteRawTag(32); output.WriteInt32(PlayerLocalJoyIdx); } + if (PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) { + output.WriteRawTag(40); + output.WriteEnum((int) PlayerLocalGamePadType); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -4673,9 +4812,15 @@ namespace AxibugProtobuf { if (PlayerNickName.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(PlayerNickName); } + if (DeviceType != global::AxibugProtobuf.DeviceType.Default) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceType); + } if (PlayerLocalJoyIdx != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlayerLocalJoyIdx); } + if (PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlayerLocalGamePadType); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -4693,9 +4838,15 @@ namespace AxibugProtobuf { if (other.PlayerNickName.Length != 0) { PlayerNickName = other.PlayerNickName; } + if (other.DeviceType != global::AxibugProtobuf.DeviceType.Default) { + DeviceType = other.DeviceType; + } if (other.PlayerLocalJoyIdx != 0) { PlayerLocalJoyIdx = other.PlayerLocalJoyIdx; } + if (other.PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) { + PlayerLocalGamePadType = other.PlayerLocalGamePadType; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -4719,9 +4870,17 @@ namespace AxibugProtobuf { break; } case 24: { + DeviceType = (global::AxibugProtobuf.DeviceType) input.ReadEnum(); + break; + } + case 32: { PlayerLocalJoyIdx = input.ReadInt32(); break; } + case 40: { + PlayerLocalGamePadType = (global::AxibugProtobuf.GamePadType) input.ReadEnum(); + break; + } } } #endif @@ -4745,9 +4904,17 @@ namespace AxibugProtobuf { break; } case 24: { + DeviceType = (global::AxibugProtobuf.DeviceType) input.ReadEnum(); + break; + } + case 32: { PlayerLocalJoyIdx = input.ReadInt32(); break; } + case 40: { + PlayerLocalGamePadType = (global::AxibugProtobuf.GamePadType) input.ReadEnum(); + break; + } } } } @@ -7217,6 +7384,7 @@ namespace AxibugProtobuf { public Protobuf_PlaySlotIdxWithJoyIdx(Protobuf_PlaySlotIdxWithJoyIdx other) : this() { playerSlotIdx_ = other.playerSlotIdx_; playerLocalJoyIdx_ = other.playerLocalJoyIdx_; + playerLocalGamePadType_ = other.playerLocalGamePadType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -7253,6 +7421,20 @@ namespace AxibugProtobuf { } } + /// Field number for the "PlayerLocalGamePadType" field. + public const int PlayerLocalGamePadTypeFieldNumber = 3; + private global::AxibugProtobuf.GamePadType playerLocalGamePadType_ = global::AxibugProtobuf.GamePadType.Keyboard; + /// + ///客户端手柄类型 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::AxibugProtobuf.GamePadType PlayerLocalGamePadType { + get { return playerLocalGamePadType_; } + set { + playerLocalGamePadType_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Protobuf_PlaySlotIdxWithJoyIdx); @@ -7268,6 +7450,7 @@ namespace AxibugProtobuf { } if (PlayerSlotIdx != other.PlayerSlotIdx) return false; if (PlayerLocalJoyIdx != other.PlayerLocalJoyIdx) return false; + if (PlayerLocalGamePadType != other.PlayerLocalGamePadType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -7276,6 +7459,7 @@ namespace AxibugProtobuf { int hash = 1; if (PlayerSlotIdx != 0) hash ^= PlayerSlotIdx.GetHashCode(); if (PlayerLocalJoyIdx != 0) hash ^= PlayerLocalJoyIdx.GetHashCode(); + if (PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) hash ^= PlayerLocalGamePadType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -7300,6 +7484,10 @@ namespace AxibugProtobuf { output.WriteRawTag(16); output.WriteInt32(PlayerLocalJoyIdx); } + if (PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) { + output.WriteRawTag(24); + output.WriteEnum((int) PlayerLocalGamePadType); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -7317,6 +7505,10 @@ namespace AxibugProtobuf { output.WriteRawTag(16); output.WriteInt32(PlayerLocalJoyIdx); } + if (PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) { + output.WriteRawTag(24); + output.WriteEnum((int) PlayerLocalGamePadType); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -7332,6 +7524,9 @@ namespace AxibugProtobuf { if (PlayerLocalJoyIdx != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlayerLocalJoyIdx); } + if (PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PlayerLocalGamePadType); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -7349,6 +7544,9 @@ namespace AxibugProtobuf { if (other.PlayerLocalJoyIdx != 0) { PlayerLocalJoyIdx = other.PlayerLocalJoyIdx; } + if (other.PlayerLocalGamePadType != global::AxibugProtobuf.GamePadType.Keyboard) { + PlayerLocalGamePadType = other.PlayerLocalGamePadType; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -7371,6 +7569,10 @@ namespace AxibugProtobuf { PlayerLocalJoyIdx = input.ReadInt32(); break; } + case 24: { + PlayerLocalGamePadType = (global::AxibugProtobuf.GamePadType) input.ReadEnum(); + break; + } } } #endif @@ -7393,6 +7595,10 @@ namespace AxibugProtobuf { PlayerLocalJoyIdx = input.ReadInt32(); break; } + case 24: { + PlayerLocalGamePadType = (global::AxibugProtobuf.GamePadType) input.ReadEnum(); + break; + } } } } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs index 1bc31cfb..99c5c089 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs @@ -1,6 +1,7 @@ using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Event; using AxibugProtobuf; +using System; using System.Collections.Generic; namespace AxibugEmuOnline.Client @@ -115,12 +116,16 @@ namespace AxibugEmuOnline.Client { m_delayCreateRoom = false; //延迟创建房间成功后,同步本地手柄连接状态 - Dictionary temp = new Dictionary(); + Dictionary> temp = new Dictionary>(); var setuper = App.emu.Core.GetControllerSetuper(); for (int i = 0; i < 4; i++) { var joyIndex = setuper.GetSlotConnectingControllerIndex(i); - if (joyIndex != null) temp[(uint)i] = (uint)joyIndex.Value; + + //TODO 手柄类型 + GamePadType gpType = GamePadType.GlobalGamePad; + + if (joyIndex != null) temp[(uint)i] = new ValueTuple((uint)joyIndex.Value, gpType); } App.roomMgr.SendChangePlaySlotIdxWithJoyIdx(temp); } diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfoPanel.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfoPanel.cs index 137a6de5..fd93e767 100644 --- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfoPanel.cs +++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfoPanel.cs @@ -2,6 +2,7 @@ using AxibugEmuOnline.Client.ClientCore; using AxibugEmuOnline.Client.Event; using AxibugEmuOnline.Client.Manager; +using AxibugProtobuf; using System; using System.Collections.Generic; using UnityEngine; @@ -28,7 +29,11 @@ public class ControllerInfoPanel : MonoBehaviour //找到第一个空闲手柄插槽 var freeSlotIndex = s_freeSlots[0]; - App.roomMgr.SendChangePlaySlotIdxWithJoyIdx((uint)joyIndex, (uint)freeSlotIndex); + + //TODO 手柄类型 + GamePadType gpType = GamePadType.GlobalGamePad; + + App.roomMgr.SendChangePlaySlotIdxWithJoyIdx((uint)joyIndex, (uint)freeSlotIndex, gpType); } else //不在房间中,直接设置 {