新输入系统
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user