新输入系统

This commit is contained in:
2025-05-11 21:42:24 +08:00
parent e5edaa7bca
commit aadd564c38
20 changed files with 12022 additions and 3525 deletions

View File

@@ -39,7 +39,7 @@ namespace NBF
return States.Player.Idle;
}
if (InputManager.IsMouseLeft)
if (InputManager.IsOp1)
{
if (_owner.PlayerAnimatorCtrl.ThrowMode == ThrowModeEnum.Float)
{
@@ -53,7 +53,7 @@ namespace NBF
}
}
if (InputManager.IsMouseRight)
if (InputManager.IsOp2)
{
if (_owner.PlayerAnimatorCtrl.ThrowMode == ThrowModeEnum.Spin)
{

View File

@@ -85,7 +85,7 @@ namespace NBF
if (_owner.Gears.Rod)
{
//如果准备好了杆子,则可进入抛竿
if (Input.GetMouseButtonDown(0))
if (InputManager.IsOp1)
{
return States.Player.WaitThrow;
}

View File

@@ -65,7 +65,7 @@ namespace NBF
ChargedProgress = 1;
}
if (!InputManager.IsMouseLeft)
if (!InputManager.IsOp1)
{
Stage = Phase.Confirm;
}

View File

@@ -34,6 +34,13 @@ namespace NBF
Timer.Once(1f, this, EnableFirstPersonController);
App.Inst.SetMouseCurrsor(false);
InputManager.OnQuickIndexAction += OnQuickIndexAction;
}
private void OnDestroy()
{
InputManager.OnQuickIndexAction -= OnQuickIndexAction;
}
private void EnableFirstPersonController()
@@ -41,14 +48,24 @@ namespace NBF
firstPersonController.enabled = true;
}
private void OnQuickIndexAction(int index)
{
nextShowSlotIndex = index;
}
private void Update()
{
// firstPersonController.horizontal = InputManager.movementAxis.x;
// firstPersonController.vertical = InputManager.movementAxis.y;
//
// firstPersonController.isJumping = InputManager.isJumping;
// firstPersonController.isRuning = InputManager.isRunning;
var movementAxis = InputManager.GetMovementInput();
if (movementAxis != Vector2.zero)
{
// Debug
}
firstPersonController.horizontal = movementAxis.x;
firstPersonController.vertical = movementAxis.y;
// firstPersonController.isJumping = InputManager.IsJumping;
firstPersonController.isRuning = InputManager.IsRunning;
// firstPersonController.m_MouseLook.ControllerHandMode = GameManager.Instance._playerData
// .Player[GameManager.Instance._playerData.currentPlayerProfileIndex].controllerSetup;
@@ -67,42 +84,10 @@ namespace NBF
firstPersonController.m_RunSpeed = runningSpeed;
}
// firstPersonController.m_MouseLook.XSensitivity =
// GameManager.Instance._playerData.Player[GameManager.Instance._playerData.currentPlayerProfileIndex]
// .mouseSensitivity * GetPlayerHandPower();
// firstPersonController.m_MouseLook.YSensitivity =
// GameManager.Instance._playerData.Player[GameManager.Instance._playerData.currentPlayerProfileIndex]
// .mouseSensitivity * GetPlayerHandPower();
if (_player.CanChangeGear())
{
// if (InputManager.isShowSlot0)
// {
// nextShowSlotIndex = 0;
// }
//
// if (InputManager.isShowSlot1)
// {
// nextShowSlotIndex = 1;
// }
//
// if (InputManager.isShowSlot2)
// {
// nextShowSlotIndex = 2;
// }
//
// if (InputManager.isShowSlot3)
// {
// nextShowSlotIndex = 3;
// }
//
// if (InputManager.isShowSlot4)
// {
// nextShowSlotIndex = 4;
// }
if (nextShowSlotIndex != -1)
if (nextShowSlotIndex > 0)
{
Debug.LogError("切换钓组=========");
var data = Fishing.Inst.Datasource;