diff --git a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/RoomPlayerSlot/RoomPlayerSlotUnit.prefab b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/RoomPlayerSlot/RoomPlayerSlotUnit.prefab
index fb3a3270..782cbb84 100644
--- a/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/RoomPlayerSlot/RoomPlayerSlotUnit.prefab
+++ b/AxibugEmuOnline.Client/Assets/Resources/UIPrefabs/RoomPlayerSlot/RoomPlayerSlotUnit.prefab
@@ -53,7 +53,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2371389415552619370}
- m_Enabled: 1
+ m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
@@ -200,7 +200,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1bfe4359a48b5c349b439e88eb53b8b1, type: 3}
m_Name:
m_EditorClassIdentifier:
- m_controllerIndex: 0
+ m_slotIndex: 0
m_connectInfoNode: {fileID: 2371389415552619370}
m_indexIcon: {fileID: 4536003039670490184}
m_playerName: {fileID: 6617607173830585898}
@@ -275,8 +275,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 30.93, y: -1.59}
- m_SizeDelta: {x: 146.1, y: 30.63}
+ m_AnchoredPosition: {x: 6.225006, y: -1.59}
+ m_SizeDelta: {x: 238.55, y: 30.63}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4464870872037843803
CanvasRenderer:
@@ -308,12 +308,12 @@ MonoBehaviour:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 33a3bdf8f6bd1ec4eba7c4bc58183212, type: 3}
- m_FontSize: 20
+ m_FontSize: 24
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 4
- m_MaxSize: 20
- m_Alignment: 4
+ m_MaxSize: 27
+ m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs
index efff978f..a2cd39d9 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppRoom.cs
@@ -408,27 +408,28 @@ namespace AxibugEmuOnline.Client.Manager
/// 发送修改玩家槽位,但是增量
///
/// 玩家占用房间GamePlaySlot和LocalJoyIdx字典
- public void SendChangePlaySlotIdxWithJoyIdx(uint localJoyIndex, uint slotIndex, GamePadType localGamePadType)
+ public void SendChangePlaySlotIdxWithJoyIdx(uint localJoyIndex, uint slotIndex)
{
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] = new ValueTuple((uint)item.PlayerLocalJoyIdx, item.PlayerLocalGamePadType);
+ temp[(uint)i] = (uint)item.PlayerLocalJoyIdx;
}
- temp[slotIndex] = new ValueTuple(localJoyIndex, localGamePadType);
+ temp[slotIndex] = localJoyIndex;
SendChangePlaySlotIdxWithJoyIdx(temp);
}
+
///
/// 发送修改玩家槽位,全量
///
/// 玩家占用房间GamePlaySlot和LocalJoyIdx字典
- public void SendChangePlaySlotIdxWithJoyIdx(Dictionary> dictSlotIdx2LocalJoyIdx)
+ public void SendChangePlaySlotIdxWithJoyIdx(Dictionary dictSlotIdx2LocalJoyIdx)
{
if (!InRoom)
return;
@@ -440,8 +441,7 @@ namespace AxibugEmuOnline.Client.Manager
_Protobuf_Room_Change_PlaySlotWithJoy.SlotWithJoy.Add(new Protobuf_PlaySlotIdxWithJoyIdx()
{
PlayerSlotIdx = (int)slotdata.Key,
- PlayerLocalJoyIdx = (int)slotdata.Value.Item1,
- PlayerLocalGamePadType = slotdata.Value.Item2,
+ PlayerLocalJoyIdx = (int)slotdata.Value,
});
}
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/Model/EmuCoreBinder.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/Model/EmuCoreBinder.cs
index 30803537..95b3ae58 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/Model/EmuCoreBinder.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/Model/EmuCoreBinder.cs
@@ -8,8 +8,9 @@ using UnityEngine;
///
/// 模拟器核心控制器键位绑定器
+/// 用于实现来自中的输入设备和模拟器的控制器的按键绑定
///
-///
+/// 模拟器平台的控制器类型枚举
public abstract class EmuCoreBinder : InternalEmuCoreBinder,
IDeviceBinder,
IDeviceBinder,
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/ControllerInterface.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/ControllerInterface.cs
index e5958ebb..e8e8002c 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/ControllerInterface.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/Manager/ControllerInterface.cs
@@ -12,6 +12,13 @@ public interface IControllerSetuper
uint? con2ToSlot = null,
uint? con3ToSlot = null);
+ ///
+ /// 增量式的修改一个手柄和一个槽位的连接关系
+ ///
+ ///
+ ///
+ void LetControllerConnect(int conIndex, uint slotIndex);
+
///
/// 指定手柄插槽位,获取当前槽位连接的本地手柄序号
///
@@ -26,12 +33,7 @@ public interface IControllerSetuper
///
uint? GetFreeSlotIndex();
- ///
- /// 增量式的修改一个手柄和一个槽位的连接关系
- ///
- ///
- ///
- void LetControllerConnect(int conIndex, uint slotIndex);
+
}
public interface IController
{
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs
index 97c00934..b1daa708 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/InGameUI/InGameUI.cs
@@ -125,16 +125,13 @@ 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++)
+ for (uint i = 0; i < 4; i++)
{
- var joyIndex = setuper.GetSlotConnectingControllerIndex(i);
+ var joyIndex = setuper.GetSlotConnectingControllerIndex((int)i);
- //TODO 手柄类型
- GamePadType gpType = GamePadType.GlobalGamePad;
-
- if (joyIndex != null) temp[(uint)i] = new ValueTuple((uint)joyIndex.Value, gpType);
+ if (joyIndex != null) temp[i] = (uint)joyIndex.Value;
}
App.roomMgr.SendChangePlaySlotIdxWithJoyIdx(temp);
}
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfo.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfo.cs
index 35ea2a58..e71b2fbe 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfo.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfo.cs
@@ -18,6 +18,7 @@ public class ControllerInfo : MonoBehaviour
[SerializeField]
Text m_playerName;
private bool m_islocal;
+ private Tweener m_tween;
public int SlotIndex
{
@@ -67,7 +68,16 @@ public class ControllerInfo : MonoBehaviour
if (controller == null) return;
if (!controller.AnyButtonDown()) return;
- m_indexIcon.rectTransform.DOShakePosition(0.1f);
+ if (m_tween != null)
+ {
+ m_indexIcon.rectTransform.anchoredPosition = Vector2.zero;
+ m_tween.Kill();
+ m_tween = null;
+ }
+ m_tween = m_indexIcon.rectTransform.DOShakePosition(0.1f).SetLink(gameObject).OnComplete(() =>
+ {
+ m_tween = null;
+ });
}
}
@@ -94,7 +104,6 @@ public class ControllerInfo : MonoBehaviour
{
SetDisconnect();
return;
-
}
var connecter = App.emu.Core.GetControllerSetuper();
diff --git a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfoPanel.cs b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfoPanel.cs
index 6ea98099..61242074 100644
--- a/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfoPanel.cs
+++ b/AxibugEmuOnline.Client/Assets/Script/AppMain/UI/XMBTopGroupUI/ControllerInfoPanel.cs
@@ -28,10 +28,7 @@ public class ControllerInfoPanel : MonoBehaviour
//找到第一个空闲手柄插槽
var freeSlotIndex = s_freeSlots[0];
- //TODO 手柄类型
- GamePadType gpType = GamePadType.GlobalGamePad;
-
- App.roomMgr.SendChangePlaySlotIdxWithJoyIdx((uint)joyIndex, (uint)freeSlotIndex, gpType);
+ App.roomMgr.SendChangePlaySlotIdxWithJoyIdx((uint)joyIndex, (uint)freeSlotIndex);
}
else //不在房间中,直接设置
{