This commit is contained in:
2026-06-04 12:42:00 +07:00
parent 5526341041
commit f70082a350
14 changed files with 697 additions and 447 deletions

View File

@@ -6,55 +6,17 @@
<component name="ChangeListManager">
<list default="true" id="f9183c68-daf0-43b8-be4c-fad79983f91b" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.HALLUCINATE/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.HALLUCINATE/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Debug/PlayerDebugProvider.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Debug/PlayerDebugProvider.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/GameSetup/CharacterAutoSetup.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/GameSetup/CharacterAutoSetup.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Interaction/BaseInteractable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Interaction/BaseInteractable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Interaction/DoorInteractable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Interaction/DoorInteractable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Interaction/LampInteractable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Interaction/LampInteractable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Interface/IInteractable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Interface/IInteractable.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Network/BasicSpawner.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Network/BasicSpawner.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Input/InputReader.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Input/InputReader.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Interaction/Item Manager/vDrawHideMeleeWeapons.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Interaction/Item Manager/vDrawHideMeleeWeapons.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/Actions/vLadderAction.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/Actions/vLadderAction.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/vBlockUnarmedAttack.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/vBlockUnarmedAttack.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/vMeleeCombatInput.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/vMeleeCombatInput.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/vThirdPersonInput.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/CharacterController/vThirdPersonInput.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/ParkourAction.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/ParkourAction.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerAirDashState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerAirDashState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerAnimationHandler.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerAnimationHandler.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerBaseState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerBaseState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerCrouchState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerCrouchState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerDashState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerDashState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerDodgeState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerDodgeState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerFallState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerFallState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerIdleState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerIdleState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerInteractState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerInteractState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerInteraction.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerInteraction.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerJumpState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerJumpState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerMoveState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerMoveState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerMovement.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerMovement.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerParkourState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerParkourState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerRunState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerRunState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerStateMachine.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerStateMachine.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerStats.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerStats.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerThrustState.cs" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Prototype/PlayerThrustState.cs.meta" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/VFX/SukunaDomainController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/VFX/SukunaDomainController.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Third Parties/TextMesh Pro/Resources/Fonts &amp; Materials/LiberationSans SDF - Fallback.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Third Parties/TextMesh Pro/Resources/Fonts &amp; Materials/LiberationSans SDF - Fallback.asset" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Generic/Triggers/vSimpleTriggerWithInput.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/Generic/Triggers/vSimpleTriggerWithInput.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/LockOn/vLockOn.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/LockOn/vLockOn.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Shooter/vLockOnShooter.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/Shooter/vLockOnShooter.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Shooter/vShooterMeleeInput.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/Shooter/vShooterMeleeInput.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/Weapon/vDrawHideShooterWeapons.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/Weapon/vDrawHideShooterWeapons.cs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -61,9 +61,10 @@ namespace OnlyScove.Scripts
public virtual bool IsSprintHeld { get; protected set; }
public virtual bool IsAttackHeld { get; protected set; }
public bool IsAimHeld { get; protected set; }
public bool IsBlockHeld { get; protected set; }
public bool IsInteractHeld { get; protected set; }
public bool IsScopeViewHeld { get; protected set; }
public void ApplyNetworkInput(Vector2 move, bool isSprint)
{
@@ -85,15 +86,46 @@ namespace OnlyScove.Scripts
public event Action OnReloadEvent;
public event Action OnStrongAttackEvent;
public event Action OnSwitchSideEvent;
public event Action OnScopeViewEvent;
// UI Events
public event Action OnToggleSettingsEvent; // Cho Ctrl+O
public event Action OnCancelEvent; // Cho phím ESC hoặc phím đóng UI
// Polling flags
private bool wasAttackPressed;
private bool wasStrongAttackPressed;
private bool wasReloadPressed;
private bool wasSwitchSidePressed;
private bool wasScopeViewPressed;
private bool wasInteractPressed;
private bool wasDodgePressed;
private bool wasCrouchPressed;
private bool wasJumpPressed;
private bool wasAimReleased;
private bool wasNextPressed;
private bool wasPreviousPressed;
private bool wasToggleViewPressed;
public bool ConsumeAttack() { bool v = wasAttackPressed; wasAttackPressed = false; return v; }
public bool ConsumeStrongAttack() { bool v = wasStrongAttackPressed; wasStrongAttackPressed = false; return v; }
public bool ConsumeReload() { bool v = wasReloadPressed; wasReloadPressed = false; return v; }
public bool ConsumeSwitchSide() { bool v = wasSwitchSidePressed; wasSwitchSidePressed = false; return v; }
public bool ConsumeScopeView() { bool v = wasScopeViewPressed; wasScopeViewPressed = false; return v; }
public bool ConsumeInteract() { bool v = wasInteractPressed; wasInteractPressed = false; return v; }
public bool ConsumeDodge() { bool v = wasDodgePressed; wasDodgePressed = false; return v; }
public bool ConsumeCrouch() { bool v = wasCrouchPressed; wasCrouchPressed = false; return v; }
public bool ConsumeJump() { bool v = wasJumpPressed; wasJumpPressed = false; return v; }
public bool ConsumeAimReleased() { bool v = wasAimReleased; wasAimReleased = false; return v; }
public bool ConsumeNext() { bool v = wasNextPressed; wasNextPressed = false; return v; }
public bool ConsumePrevious() { bool v = wasPreviousPressed; wasPreviousPressed = false; return v; }
public bool ConsumeToggleView() { bool v = wasToggleViewPressed; wasToggleViewPressed = false; return v; }
public void OnAttack(InputAction.CallbackContext context)
{
if (context.performed)
{
wasAttackPressed = true;
OnAttackEvent?.Invoke();
IsAttackHeld = true;
}
@@ -130,7 +162,11 @@ namespace OnlyScove.Scripts
public void OnToggleView(InputAction.CallbackContext context)
{
if (context.performed) OnToggleViewEvent?.Invoke();
if (context.performed)
{
wasToggleViewPressed = true;
OnToggleViewEvent?.Invoke();
}
}
public void OnJump(InputAction.CallbackContext context)
@@ -142,7 +178,6 @@ namespace OnlyScove.Scripts
}
}
private bool wasJumpPressed;
public bool ConsumeJumpInput()
{
bool val = wasJumpPressed;
@@ -152,27 +187,52 @@ namespace OnlyScove.Scripts
public void OnDodgeOrThrust(InputAction.CallbackContext context)
{
if (context.performed) OnDodgeEvent?.Invoke();
if (context.performed)
{
wasDodgePressed = true;
OnDodgeEvent?.Invoke();
}
}
public void OnCrouch(InputAction.CallbackContext context)
{
if (context.performed) OnCrouchEvent?.Invoke();
if (context.performed)
{
wasCrouchPressed = true;
OnCrouchEvent?.Invoke();
}
}
public void OnInteract(InputAction.CallbackContext context)
{
if (context.performed) OnInteractEvent?.Invoke();
if (context.performed)
{
wasInteractPressed = true;
IsInteractHeld = true;
OnInteractEvent?.Invoke();
}
if (context.canceled)
{
IsInteractHeld = false;
}
}
public void OnNext(InputAction.CallbackContext context)
{
if (context.performed) OnNextInteractEvent?.Invoke();
if (context.performed)
{
wasNextPressed = true;
OnNextInteractEvent?.Invoke();
}
}
public void OnPrevious(InputAction.CallbackContext context)
{
if (context.performed) OnPreviousInteractEvent?.Invoke();
if (context.performed)
{
wasPreviousPressed = true;
OnPreviousInteractEvent?.Invoke();
}
}
// UI Callbacks
@@ -196,7 +256,11 @@ namespace OnlyScove.Scripts
public void OnAim(InputAction.CallbackContext context)
{
if (context.performed) IsAimHeld = true;
if (context.canceled) IsAimHeld = false;
if (context.canceled)
{
IsAimHeld = false;
wasAimReleased = true;
}
}
public void OnBlock(InputAction.CallbackContext context)
{
@@ -206,17 +270,43 @@ namespace OnlyScove.Scripts
public void OnStrongAttack(InputAction.CallbackContext context)
{
if(context.performed) OnStrongAttackEvent?.Invoke();
if (context.performed)
{
wasStrongAttackPressed = true;
OnStrongAttackEvent?.Invoke();
}
}
public void OnReload(InputAction.CallbackContext context)
{
if (context.performed) OnReloadEvent?.Invoke();
if (context.performed)
{
wasReloadPressed = true;
OnReloadEvent?.Invoke();
}
}
public void OnSwitchSide(InputAction.CallbackContext context)
{
if (context.performed) OnSwitchSideEvent?.Invoke();
if (context.performed)
{
wasSwitchSidePressed = true;
OnSwitchSideEvent?.Invoke();
}
}
public void OnScopeView(InputAction.CallbackContext context)
{
if (context.performed)
{
wasScopeViewPressed = true;
IsScopeViewHeld = true;
OnScopeViewEvent?.Invoke();
}
if (context.canceled)
{
IsScopeViewHeld = false;
}
}
}
}

View File

@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
namespace Invector
{
@@ -16,7 +16,6 @@ namespace Invector
public bool lockInventoryInputOnLock;
[vReadOnly]
public bool isLocked;
public GenericInput hideAndDrawWeaponsInput = new GenericInput("H", "LB", "LB");
[vEditorToolbar("Melee")]
[Header("Draw Immediate Conditions")]
@@ -29,7 +28,6 @@ namespace Invector
public bool weaponsHided;
[vReadOnly(false)]
public bool previouslyWeaponsHided;
protected float currentTimer;
protected bool forceHide;
@@ -48,7 +46,7 @@ namespace Invector
protected virtual void ControlWeapons()
{
if (isLocked || melee.cc == null || melee.cc.customAction)
if (isLocked || melee == null || melee.cc == null || melee.cc.customAction)
return;
HandleInput();
@@ -196,9 +194,10 @@ namespace Invector
protected virtual void HandleInput()
{
if (hideAndDrawWeaponsInput.GetButtonDown() && !IsEquipping)
if (melee != null && melee.inputReader != null && melee.inputReader.ConsumeSwitchSide() && !IsEquipping)
{
// Note: I'm using SwitchSide action as a placeholder or you can map a dedicated "Hide/Draw" action.
// Assuming SwitchSide is suitable for now as it's Tab/Middle Click.
if (CanHideRightWeapon() || CanHideLeftWeapon())
{
HideWeapons();
@@ -221,11 +220,11 @@ namespace Invector
protected virtual bool DrawWeaponsImmediateConditions()
{
if (!melee || melee.cc.customAction || !melee.meleeManager || (melee.meleeManager.CurrentAttackWeapon == null && melee.meleeManager.CurrentDefenseWeapon == null))
if (!melee || melee.inputReader == null || melee.cc.customAction || !melee.meleeManager || (melee.meleeManager.CurrentAttackWeapon == null && melee.meleeManager.CurrentDefenseWeapon == null))
return false;
else
{
return melee.weakAttackInput.GetButton() && meleeWeakAttack || melee.strongAttackInput.GetButton() && meleeStrongAttack || melee.blockInput.GetButton() && meleeBlock;
return (melee.inputReader.IsAttackHeld && meleeWeakAttack) || (melee.inputReader.ConsumeStrongAttack() && meleeStrongAttack) || (melee.inputReader.IsBlockHeld && meleeBlock);
}
}
@@ -353,5 +352,4 @@ namespace Invector
StartCoroutine(holderManager.UnequipRoutine(equipment.referenceItem.disableDelayTime, immediate, onStart, onFinish));
}
}
}
}

View File

@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using OnlyScove.Scripts;
using UnityEngine;
using UnityEngine.Events;
namespace Invector.vCharacterController.vActions
@@ -18,27 +19,17 @@ namespace Invector.vCharacterController.vActions
public float fastClimbSpeed = 3f;
[Tooltip("How much Stamina will be consumed when climbing faster")]
public float fastClimbStamina = 30f;
[Tooltip("Input to use the ladder going up or down")]
public GenericInput verticalInput = new GenericInput("Vertical", "LeftAnalogVertical", "Vertical");
[Tooltip("Input to enter the ladder")]
public GenericInput enterInput = new GenericInput("E", "A", "A");
[Tooltip("Input to exit the ladder")]
public GenericInput exitInput = new GenericInput("Space", "B", "B");
[Tooltip("Input to climb faster")]
public GenericInput fastClimbInput = new GenericInput("LeftShift", "LeftStickClick", "LeftStickClick");
[Tooltip("Input to climb faster")]
public GenericInput slideDownInput = new GenericInput("Q", "X", "X");
[vEditorToolbar("Events")]
public UnityEvent OnEnterLadder;
public UnityEvent OnExitLadder;
public UnityEvent OnEnterTriggerLadder;
public UnityEvent OnExitTriggerLadder;
[vEditorToolbar("Debug")]
public bool debugMode;
protected vThirdPersonInput tpInput;
protected InputReader inputReader;
[vReadOnly(false)]
[SerializeField]
protected vTriggerLadderAction targetLadderAction;
@@ -77,7 +68,6 @@ namespace Invector.vCharacterController.vActions
#endregion
protected vThirdPersonInput tpInput;
protected bool isAligningMidAir;
protected override void SetUpListener()
@@ -93,12 +83,15 @@ namespace Invector.vCharacterController.vActions
tpInput = GetComponent<vThirdPersonInput>();
if (tpInput)
{
inputReader = tpInput.inputReader;
tpInput.onUpdate -= UpdateLadderBehavior;
tpInput.onUpdate += UpdateLadderBehavior;
tpInput.onAnimatorMove -= UsingLadder;
tpInput.onAnimatorMove += UsingLadder;
}
if (inputReader == null) inputReader = GetComponentInParent<InputReader>();
}
protected virtual void UpdateLadderBehavior()
@@ -110,12 +103,12 @@ namespace Invector.vCharacterController.vActions
protected virtual void EnterLadderInput()
{
if (targetLadderAction == null || tpInput.cc.customAction || tpInput.cc.isJumping || !tpInput.cc.isGrounded || tpInput.cc.isRolling)
if (targetLadderAction == null || tpInput.cc.customAction || tpInput.cc.isJumping || !tpInput.cc.isGrounded || tpInput.cc.isRolling || inputReader == null)
{
return;
}
if (enterInput.GetButtonDown() && !enterLadderStarted && !isUsingLadder && !targetLadderAction.autoAction)
if (inputReader.ConsumeInteract() && !enterLadderStarted && !isUsingLadder && !targetLadderAction.autoAction)
{
TriggerEnterLadder();
}
@@ -123,7 +116,7 @@ namespace Invector.vCharacterController.vActions
protected virtual void ExitLadderInput()
{
if (!isUsingLadder)
if (!isUsingLadder || inputReader == null)
{
return;
}
@@ -137,17 +130,17 @@ namespace Invector.vCharacterController.vActions
{
if (tpInput.cc.IsAnimatorTag("ClimbLadder"))
{
if (slideDownInput.GetButtonDown() && !inExitingLadderAnimation)
if (inputReader.ConsumeDodge() && !inExitingLadderAnimation)
{
tpInput.cc.animator.CrossFadeInFixedTime("Ladder_SlideDown", 0.2f);
}
// exit ladder at any moment by pressing the cancelInput
if (exitInput.GetButtonDown())
if (inputReader.ConsumeJump())
{
if (debugMode)
{
Debug.Log("Quick Exit..." + currentLadderAction.name + "_" + currentLadderAction.transform.parent.gameObject.name);
Debug.Log("Quick Exit...");
}
tpInput.cc.animator.speed = 1;
tpInput.cc.animator.CrossFadeInFixedTime("QuickExitLadder", 0.1f);
@@ -162,7 +155,7 @@ namespace Invector.vCharacterController.vActions
if (animationClip == "ExitLadderBottom")
{
// exit ladder when reach the bottom by pressing the cancelInput or pressing down at
if (exitInput.GetButtonDown() && !triggerExitOnce || (speed <= -0.05f && !triggerExitOnce) || (tpInput.cc.IsAnimatorTag("LadderSlideDown") && targetLadderAction != null && !triggerExitOnce))
if (inputReader.ConsumeJump() && !triggerExitOnce || (speed <= -0.05f && !triggerExitOnce) || (tpInput.cc.IsAnimatorTag("LadderSlideDown") && targetLadderAction != null && !triggerExitOnce))
{
if (debugMode)
{
@@ -337,7 +330,7 @@ namespace Invector.vCharacterController.vActions
protected virtual void UsingLadder()
{
if (!isUsingLadder)
if (!isUsingLadder || inputReader == null)
{
return;
}
@@ -349,7 +342,7 @@ namespace Invector.vCharacterController.vActions
tpInput.CameraInput();
// go up or down
speed = verticalInput.GetAxis();
speed = inputReader.MoveInput.y;
tpInput.cc.animator.SetFloat(vAnimatorParameters.InputVertical, speed, 0.1f, Time.deltaTime);
if (speed >= 0.05f || speed <= -0.05f)
{
@@ -361,7 +354,7 @@ namespace Invector.vCharacterController.vActions
}
// increase speed by input and consume stamina
if (fastClimbInput.GetButton() && tpInput.cc.currentStamina > 0)
if (inputReader.IsSprintHeld && tpInput.cc.currentStamina > 0)
{
currentClimbSpeed = fastClimbSpeed;
StaminaConsumption();

View File

@@ -30,8 +30,7 @@ namespace Invector.vCharacterController
///Disable input usage if Unarmed
if (!IsActiveUnarmedAttack)
{
meleeCombatInput.weakAttackInput.useInput = meleeCombatInput.isArmed;
meleeCombatInput.strongAttackInput.useInput = meleeCombatInput.isArmed;
// Inputs are now handled via InputReader polling in vMeleeCombatInput
}
}
@@ -40,8 +39,6 @@ namespace Invector.vCharacterController
if (value != IsActiveUnarmedAttack)
{
IsActiveUnarmedAttack = value;
meleeCombatInput.weakAttackInput.useInput = value;
meleeCombatInput.strongAttackInput.useInput = value;
}
}
}

View File

@@ -12,12 +12,6 @@ namespace Invector.vCharacterController
{
#region Variables
[vEditorToolbar("Inputs")]
[Header("Melee Inputs")]
public GenericInput weakAttackInput = new GenericInput("Mouse0", "RB", "RB");
public GenericInput strongAttackInput = new GenericInput("Alpha1", false, "RT", true, "RT", false);
public GenericInput blockInput = new GenericInput("Mouse1", "LB", "LB");
internal vMeleeManager meleeManager;
protected virtual bool _isAttacking { get; set; }
public virtual bool isAttacking { get => _isAttacking || cc.IsAnimatorTag("Attack"); protected set { _isAttacking = value; } }
@@ -58,11 +52,6 @@ namespace Invector.vCharacterController
protected override void Start()
{
base.Start();
if (inputReader != null)
{
inputReader.OnAttackEvent += TriggerWeakAttack;
inputReader.OnStrongAttackEvent += TriggerStrongAttack;
}
}
protected override void LateUpdate()
@@ -87,9 +76,9 @@ namespace Invector.vCharacterController
if (MeleeAttackConditions() && !lockMeleeInput)
{
// MeleeWeakAttackInput();
// MeleeStrongAttackInput();
// BlockingInput();
MeleeWeakAttackInput();
MeleeStrongAttackInput();
BlockingInput();
}
else
{
@@ -105,12 +94,12 @@ namespace Invector.vCharacterController
/// </summary>
public virtual void MeleeWeakAttackInput()
{
if (animator == null)
if (animator == null || inputReader == null)
{
return;
}
if (weakAttackInput.GetButtonDown() && MeleeAttackStaminaConditions())
if (inputReader.ConsumeAttack() && MeleeAttackStaminaConditions())
{
TriggerWeakAttack();
}
@@ -127,12 +116,12 @@ namespace Invector.vCharacterController
/// </summary>
public virtual void MeleeStrongAttackInput()
{
if (animator == null)
if (animator == null || inputReader == null)
{
return;
}
if (strongAttackInput.GetButtonDown() && (!meleeManager.CurrentActiveAttackWeapon || meleeManager.CurrentActiveAttackWeapon.useStrongAttack) && MeleeAttackStaminaConditions())
if (inputReader.ConsumeStrongAttack() && (!meleeManager.CurrentActiveAttackWeapon || meleeManager.CurrentActiveAttackWeapon.useStrongAttack) && MeleeAttackStaminaConditions())
{
TriggerStrongAttack();
}

View File

@@ -24,18 +24,6 @@ namespace Invector.vCharacterController
[vHelpBox("PC only - use it to toggle between run/walk", vHelpBoxAttribute.MessageType.Info)]
public KeyCode toggleWalk = KeyCode.CapsLock;
[Header("Movement Input")]
// public GenericInput horizontalInput = new GenericInput("Horizontal", "LeftAnalogHorizontal", "Horizontal");
// public GenericInput verticalInput = new GenericInput("Vertical", "LeftAnalogVertical", "Vertical");
// public GenericInput sprintInput = new GenericInput("LeftShift", "LeftStickClick", "LeftStickClick");
// public GenericInput crouchInput = new GenericInput("C", "Y", "Y");
// public GenericInput strafeInput = new GenericInput("Tab", "RightStickClick", "RightStickClick");
// public GenericInput jumpInput = new GenericInput("Space", "X", "X");
// public GenericInput rollInput = new GenericInput("Q", "B", "B");
[Header("New Input System")]
public InputReader inputReader;
@@ -45,12 +33,6 @@ namespace Invector.vCharacterController
[vEditorToolbar("Camera Settings")]
public bool lockCameraInput;
public bool invertCameraInputVertical, invertCameraInputHorizontal;
// [vEditorToolbar("Inputs")]
[Header("Camera Input")]
// public GenericInput rotateCameraXInput = new GenericInput("Mouse X", "RightAnalogHorizontal", "Mouse X");
// public GenericInput rotateCameraYInput = new GenericInput("Mouse Y", "RightAnalogVertical", "Mouse Y");
// public GenericInput cameraZoomInput = new GenericInput("Mouse ScrollWheel", "", "");
[vEditorToolbar("Events")]
public UnityEvent OnLockCamera;
public UnityEvent OnUnlockCamera;
@@ -144,33 +126,6 @@ namespace Invector.vCharacterController
ShowCursor(showCursorOnStart);
LockCursor(unlockCursorOnStart);
EnableOnAnimatorMove();
if (inputReader != null)
{
// Nhảy (Jump)
inputReader.OnJumpEvent += () =>
{
if (JumpConditions()) cc.Jump(true);
};
// Lộn vòng (Roll / Dodge)
inputReader.OnDodgeEvent += () =>
{
if (RollConditions()) cc.Roll();
};
// Ngồi (Crouch)
inputReader.OnCrouchEvent += () =>
{
cc.AutoCrouch();
cc.Crouch();
};
// Đổi góc nhìn hoặc Khóa mục tiêu (Strafe) - Tuỳ bạn map nút nào vào OnToggleViewEvent
inputReader.OnToggleViewEvent += () =>
{
cc.Strafe();
};
}
}
protected virtual IEnumerator CharacterInit()
@@ -530,18 +485,14 @@ namespace Invector.vCharacterController
public virtual void StrafeInput()
{
// if (strafeInput.GetButtonDown())
// {
// cc.Strafe();
// }
if (inputReader != null && inputReader.ConsumeToggleView())
{
cc.Strafe();
}
}
public virtual void SprintInput()
{
// if (sprintInput.useInput)
// {
// cc.Sprint(cc.useContinuousSprint ? sprintInput.GetButtonDown() : sprintInput.GetButton());
// }
if (inputReader == null) return;
cc.Sprint(inputReader.IsSprintHeld);
}
@@ -550,10 +501,10 @@ namespace Invector.vCharacterController
{
cc.AutoCrouch();
// if (crouchInput.useInput && crouchInput.GetButtonDown())
// {
// cc.Crouch();
// }
if (inputReader != null && inputReader.ConsumeCrouch())
{
cc.Crouch();
}
}
/// <summary>
@@ -570,10 +521,10 @@ namespace Invector.vCharacterController
/// </summary>
public virtual void JumpInput()
{
// if (jumpInput.GetButtonDown() && JumpConditions())
// {
// cc.Jump(true);
// }
if (inputReader != null && inputReader.ConsumeJump() && JumpConditions())
{
cc.Jump(true);
}
}
/// <summary>
@@ -590,10 +541,10 @@ namespace Invector.vCharacterController
/// </summary>
public virtual void RollInput()
{
// if (rollInput.GetButtonDown() && RollConditions())
// {
// cc.Roll();
// }
if (inputReader != null && inputReader.ConsumeDodge() && RollConditions())
{
cc.Roll();
}
}
#endregion

View File

@@ -2,14 +2,15 @@
using Invector.vCharacterController;
using UnityEngine;
using UnityEngine.Events;
using OnlyScove.Scripts;
[vClassHeader("Simple Trigger Input")]
public class vSimpleTriggerWithInput : vSimpleTrigger
{
public InputType inputType = InputType.GetButtonDown;
[Tooltip("Input to make the action")]
public GenericInput actionInput = new GenericInput("E", "A", "A");
[HideInInspector]
public InputReader inputReader;
public enum InputType
{
@@ -40,18 +41,28 @@ public class vSimpleTriggerWithInput : vSimpleTrigger
return;
}
if (inputReader == null)
{
inputReader = other.GetComponentInParent<InputReader>();
if (inputReader == null) inputReader = other.GetComponent<InputReader>();
}
if (inputReader == null) return;
// GetButtonDown
if (inputType == InputType.GetButtonDown)
{
if (actionInput.GetButtonDown())
if (inputReader.ConsumeInteract())
{
OnPressButton.Invoke();
}
}
// GetDoubleButton
// GetDoubleButton (Note: New Input System handles double tap via Interactions,
// but here we can implement a simple version or just skip if not used often)
else if (inputType == InputType.GetDoubleButton)
{
if (actionInput.GetDoubleButtonDown(doubleButtomTime))
// For now, mapping to single press or custom logic if needed.
if (inputReader.ConsumeInteract())
{
OnPressButton.Invoke();
}
@@ -61,25 +72,29 @@ public class vSimpleTriggerWithInput : vSimpleTrigger
{
if (_currentInputDelay <= 0)
{
var up = false;
var t = 0f;
var up = !inputReader.IsInteractHeld;
var t = currentButtonTimer;
// call the OnPressButton event after the buttomTimer is finished
if (actionInput.GetButtonTimer(ref t, ref up, buttonTimer))
{
_currentInputDelay = inputDelay;
OnPressButton.Invoke();
}
// update the button timer
if (actionInput.inButtomTimer)
if (inputReader.IsInteractHeld)
{
currentButtonTimer += Time.deltaTime;
t = currentButtonTimer / buttonTimer;
UpdateButtonTimer(t);
if (currentButtonTimer >= buttonTimer)
{
_currentInputDelay = inputDelay;
currentButtonTimer = 0;
OnPressButton.Invoke();
}
}
// reset the buttonTimer if you release the button before finishing
if (up)
if (up && currentButtonTimer > 0)
{
currentButtonTimer = 0;
CancelButtonTimer();
}
}
else
{

View File

@@ -1,4 +1,5 @@
using UnityEngine;
using OnlyScove.Scripts;
using UnityEngine;
namespace Invector.vCharacterController
{
@@ -24,11 +25,10 @@ namespace Invector.vCharacterController
public float cameraHeightOffset;
[Tooltip("Transition Speed for the Camera")]
public float lockSpeed = 0.5f;
[Header("LockOn Inputs")]
public GenericInput lockOnInput = new GenericInput("Tab", "RightStickClick", "RightStickClick");
public GenericInput nexTargetInput = new GenericInput("X", false, false, "RightAnalogHorizontal", true, false, "X", false, false);
public GenericInput previousTargetInput = new GenericInput("Z", false, false, "RightAnalogHorizontal", true, true, "Z", false, false);
[vEditorToolbar("Debug")]
public bool debugMode;
internal bool isLockingOn;
public LockOnEvent onLockOnTarget;
public LockOnEvent onUnLockOnTarget;
@@ -38,6 +38,7 @@ namespace Invector.vCharacterController
protected bool _inTarget;
protected virtual bool inTarget { get { return _inTarget; } set { _inTarget = value; } }
protected vThirdPersonInput tpInput;
protected InputReader inputReader;
#endregion
@@ -49,6 +50,8 @@ namespace Invector.vCharacterController
tpInput = GetComponent<vThirdPersonInput>();
if (tpInput)
{
inputReader = tpInput.inputReader;
tpInput.onUpdate -= UpdateLockOn;
tpInput.onUpdate += UpdateLockOn;
@@ -61,6 +64,8 @@ namespace Invector.vCharacterController
UpdateLockOn();
});
}
if (inputReader == null) inputReader = GetComponentInParent<InputReader>();
if (!aimImageContainer)
{
@@ -89,31 +94,18 @@ namespace Invector.vCharacterController
protected virtual void UpdateLockOn()
{
if (this.tpInput == null) return;
if (this.tpInput == null || inputReader == null) return;
LockOnInput();
SwitchTargetsInput();
CheckForTargetDistance();
CheckForCharacterAlive();
UpdateAimImage();
}
protected virtual void LockOnInput()
{
if (tpInput.tpCamera == null || tpInput.cc == null) return;
// lock the camera into a target, if there is any around
if (lockOnInput.GetButtonDown() && !tpInput.cc.customAction)
{
isLockingOn = !isLockingOn;
LockOn(isLockingOn);
}
// unlock the camera if the target is null
else if (isLockingOn && (tpInput.tpCamera.lockTarget == null) || LostTargetDistance())
if (isLockingOn && (tpInput.tpCamera.lockTarget == null) || LostTargetDistance())
{
isLockingOn = false;
LockOn(false);
}
// choose to use lock-on with strafe of free movement
// choose to use lock-on with strafe or free movement
if (strafeWhileLockOn && !tpInput.cc.locomotionType.Equals(vThirdPersonMotor.LocomotionType.OnlyStrafe))
{
if (isLockingOn && tpInput.tpCamera.lockTarget != null)
@@ -127,6 +119,26 @@ namespace Invector.vCharacterController
tpInput.cc.isStrafing = false;
}
}
if (isLockingOn && tpInput.tpCamera.lockTarget)
{
if (inputReader.ConsumeNext()) ChangeTarget(1);
else if (inputReader.ConsumePrevious()) ChangeTarget(-1);
}
CheckForTargetDistance();
CheckForCharacterAlive();
UpdateAimImage();
}
protected virtual void LockOnInput()
{
// lock the camera into a target, if there is any around
if (inputReader.ConsumeToggleView() && !tpInput.cc.customAction)
{
isLockingOn = !isLockingOn;
LockOn(isLockingOn);
}
}
protected virtual bool LostTargetDistance()
@@ -147,18 +159,6 @@ namespace Invector.vCharacterController
}
}
protected virtual void SwitchTargetsInput()
{
if (tpInput.tpCamera == null) return;
if (tpInput.tpCamera.lockTarget)
{
// switch between targets using Keyboard
if (previousTargetInput.GetButtonDown()) PreviousTarget();
else if (nexTargetInput.GetButtonDown()) NextTarget();
}
}
protected virtual void CheckForTargetDistance()
{
if (!isLockingOn || currentTarget == null) return;
@@ -214,7 +214,7 @@ namespace Invector.vCharacterController
aimImage.transform.gameObject.SetActive(false);
}
if (currentTarget && aimImage && aimImageContainer)
aimImage.anchoredPosition = currentTarget.GetScreenPointOffBoundsCenter(aimImageContainer, tpCamera.targetCamera, spriteHeight);
aimImage.anchoredPosition = currentTarget.GetScreenPointOffBoundsCenter(aimImageContainer, tpInput.tpCamera.targetCamera, spriteHeight);
else if (aimImageContainer)
aimImage.anchoredPosition = Vector2.zero;
}

View File

@@ -1,4 +1,6 @@
using Invector.vCharacterController;
using Invector.vCharacterController;
using OnlyScove.Scripts;
namespace Invector.vShooter
{
[vClassHeader("Shooter Lock-On")]
@@ -30,9 +32,10 @@ namespace Invector.vShooter
protected override void LockOnInput()
{
if (tpInput.tpCamera == null || tpInput.cc == null) return;
if (tpInput == null || tpInput.tpCamera == null || tpInput.cc == null || inputReader == null) return;
// lock the camera into a target, if there is any around
if (lockOnInput.GetButtonDown() && !tpInput.cc.customAction)
if (inputReader.ConsumeToggleView() && !tpInput.cc.customAction)
{
isLockingOn = !isLockingOn;
LockOn(isLockingOn);
@@ -43,10 +46,11 @@ namespace Invector.vShooter
isLockingOn = false;
LockOn(false);
}
// choose to use lock-on with strafe of free movement
if (strafeWhileLockOn && !tpInput.cc.locomotionType.Equals(vThirdPersonMotor.LocomotionType.OnlyStrafe))
{
if (shooterMelee.isAimingByInput || strafeWhileLockOn && isLockingOn && tpInput.tpCamera.lockTarget != null)
if (shooterMelee.isAimingByInput || (strafeWhileLockOn && isLockingOn && tpInput.tpCamera.lockTarget != null))
tpInput.cc.lockInStrafe = true;
else
tpInput.cc.lockInStrafe = false;

View File

@@ -8,18 +8,6 @@ namespace Invector.vCharacterController
[vClassHeader("SHOOTER/MELEE INPUT", iconName = "inputIcon")]
public class vShooterMeleeInput : vMeleeCombatInput, vIShooterIKController, PlayerController.vILockCamera
{
#region Shooter Inputs
[vEditorToolbar("Inputs")]
[Header("Shooter Inputs")]
public GenericInput aimInput = new GenericInput("Mouse1", false, "LT", true, "LT", false);
public GenericInput shotInput = new GenericInput("Mouse0", false, "RT", true, "RT", false);
public GenericInput reloadInput = new GenericInput("R", "LB", "LB");
public GenericInput switchCameraSideInput = new GenericInput("Tab", "RightStickClick", "RightStickClick");
public GenericInput scopeViewInput = new GenericInput("Z", "RB", "RB");
#endregion
#region Shooter Variables
[HideInInspector] public vShooterManager shooterManager;
@@ -293,7 +281,7 @@ namespace Invector.vCharacterController
_aimTiming = 0;
return false;
}
return shooterManager.hipfireShot && (_aimTiming > 0 || (shotInput.GetButton() && shooterManager.CurrentWeapon != null) || (!isAimingByInput && shootCountA > 0));
return shooterManager.hipfireShot && (_aimTiming > 0 || (inputReader != null && inputReader.IsAttackHeld && shooterManager.CurrentWeapon != null) || (!isAimingByInput && shootCountA > 0));
}
}
@@ -357,15 +345,6 @@ namespace Invector.vCharacterController
}
muzzlePosition = Vector3.forward * cc._capsuleCollider.radius * 2;
muzzleForward = Vector3.forward;
if (inputReader != null)
{
inputReader.OnReloadEvent += () =>
{
if (!isReloading) shooterManager.ReloadWeapon();
};
inputReader.OnSwitchSideEvent += SwitchCameraSide;
}
}
protected override void LateUpdate()
@@ -384,10 +363,6 @@ namespace Invector.vCharacterController
protected virtual void Reset()
{
// We change the Melee Attack Input for the Shooter because 'Mouse1' is the same input to Shot a Fire Weapon
weakAttackInput = new GenericInput("Mouse2", "RB", "RB");
// By default it's disable because it uses the same input as the switchCameraSideInput
// strafeInput.useInput = false;
}
/// <summary>
@@ -707,7 +682,7 @@ namespace Invector.vCharacterController
isAimingByInput = (!isReloading || shooterManager.keepAimingWhenReload) && (inputReader.IsAimHeld || (shooterManager.alwaysAiming && CurrentActiveWeapon)) && !cc.ragdolled && !cc.customAction;
}
if (aimInput.GetButtonUp() && !shotInput.GetButton())
if (inputReader.ConsumeAimReleased() && !inputReader.IsAttackHeld)
{
_aimTiming = 0f;
}
@@ -887,7 +862,7 @@ namespace Invector.vCharacterController
return;
}
if (reloadInput.GetButtonDown())
if (inputReader.ConsumeReload())
{
shootCountA = 0;
_aimTiming = 0f;
@@ -903,7 +878,7 @@ namespace Invector.vCharacterController
if (IsAiming) shooterManager.ReloadWeapon();
break;
case vShooterWeapon.AutoReloadStyle.WhenShot:
if (shotInput.GetButtonDown()) shooterManager.ReloadWeapon();
if (inputReader.ConsumeAttack()) shooterManager.ReloadWeapon();
break;
case vShooterWeapon.AutoReloadStyle.WhenAmmoAvailable:
shooterManager.ReloadWeapon();
@@ -919,12 +894,12 @@ namespace Invector.vCharacterController
/// </summary>
public virtual void SwitchCameraSideInput()
{
if (tpCamera == null)
if (tpCamera == null || inputReader == null)
{
return;
}
if (switchCameraSideInput.GetButtonDown())
if (inputReader.ConsumeSwitchSide())
{
SwitchCameraSide();
}
@@ -968,7 +943,7 @@ namespace Invector.vCharacterController
return;
}
if (isAimingByInput && aimConditions && (scopeViewInput.GetButtonDown() || CurrentActiveWeapon.onlyUseScopeUIView))
if (isAimingByInput && aimConditions && (inputReader.ConsumeScopeView() || CurrentActiveWeapon.onlyUseScopeUIView))
{
if (controlAimCanvas && CurrentActiveWeapon.scopeTarget)
{

View File

@@ -70,13 +70,13 @@ namespace Invector.vShooter
protected virtual bool DrawShooterWeaponImmediateConditions()
{
if (!shooter || !shooter.shooterManager || shooter.cc.customAction || !shooter.shooterManager.CurrentWeapon || shooter.lockInput)
if (!shooter || shooter.inputReader == null || !shooter.shooterManager || shooter.cc.customAction || !shooter.shooterManager.CurrentWeapon || shooter.lockInput)
{
return false;
}
if (shooter.CurrentActiveWeapon == null && ((shooter.aimInput.GetButtonDown() && aim) ||
(shooter.shooterManager.hipfireShot && shooter.shotInput.GetButtonDown() && hipFire) || (shooter.shotInput.GetButtonDown() && shoot)))
if (shooter.CurrentActiveWeapon == null && ((shooter.inputReader.IsAimHeld && aim) ||
(shooter.shooterManager.hipfireShot && shooter.inputReader.ConsumeAttack() && hipFire) || (shooter.inputReader.ConsumeAttack() && shoot)))
{
return true;
}

View File

@@ -33,6 +33,42 @@
"interactions": "",
"initialStateCheck": false
},
{
"name": "StrongAttack",
"type": "Button",
"id": "d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Block",
"type": "Button",
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Aim",
"type": "Button",
"id": "f1e2d3c4-b5a6-4978-9012-3456789abcde",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Reload",
"type": "Button",
"id": "98765432-10ab-cdef-0123-456789abcdef",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Interact",
"type": "Button",
@@ -60,6 +96,15 @@
"interactions": "",
"initialStateCheck": false
},
{
"name": "Dodge",
"type": "Button",
"id": "e5d4c3b2-a1b2-c3d4-e5f6-a7b8c9d0e1f2",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Previous",
"type": "Button",
@@ -87,6 +132,24 @@
"interactions": "",
"initialStateCheck": false
},
{
"name": "SwitchSide",
"type": "Button",
"id": "74839201-abcd-ef01-2345-6789abcdef01",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "ScopeView",
"type": "Button",
"id": "12345678-1234-5678-1234-567812345678",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Scroll",
"type": "Value",
@@ -121,7 +184,7 @@
{
"name": "WASD",
"id": "00ca640b-d935-4593-8157-c05846ea39b3",
"path": "Dpad",
"path": "2DVector",
"interactions": "",
"processors": "",
"groups": "",
@@ -217,28 +280,6 @@
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8",
"path": "<XRController>/{Primary2DAxis}",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "3ea4d645-4504-4529-b061-ab81934c3752",
"path": "<Joystick>/stick",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c1f7a91b-d0fd-4a62-997e-7fb9b69bf235",
@@ -261,21 +302,10 @@
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "3e5f5442-8668-4b27-a940-df99bad7e831",
"path": "<Joystick>/{Hatswitch}",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91",
"path": "<Gamepad>/buttonWest",
"path": "<Gamepad>/rightShoulder",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
@@ -294,94 +324,6 @@
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "886e731e-7071-4ae4-95c0-e61739dad6fd",
"path": "<Touchscreen>/primaryTouch/tap",
"interactions": "",
"processors": "",
"groups": ";Touch",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "ee3d0cd2-254e-47a7-a8cb-bc94d9658c54",
"path": "<Joystick>/trigger",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8255d333-5683-4943-a58a-ccb207ff1dce",
"path": "<XRController>/{PrimaryAction}",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b3c1c7f0-bd20-4ee7-a0f1-899b24bca6d7",
"path": "<Keyboard>/enter",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c1c5f1be-b30c-4565-a190-774554559b8f",
"path": "<Keyboard>/e",
"interactions": "",
"processors": "",
"groups": "",
"action": "Next",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "cbac6039-9c09-46a1-b5f2-4e5124ccb5ed",
"path": "<Keyboard>/2",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Next",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e15ca19d-e649-4852-97d5-7fe8ccc44e94",
"path": "<Gamepad>/dpad/right",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Next",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f2e9ba44-c423-42a7-ad56-f20975884794",
"path": "<Keyboard>/leftShift",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8cbb2f4b-a784-49cc-8d5e-c010b8c7f4e6",
@@ -395,11 +337,11 @@
},
{
"name": "",
"id": "d8bf24bf-3f2f-4160-a97c-38ec1eb520ba",
"path": "<XRController>/trigger",
"id": "f2e9ba44-c423-42a7-ad56-f20975884794",
"path": "<Keyboard>/leftShift",
"interactions": "",
"processors": "",
"groups": "XR",
"groups": "Keyboard&Mouse",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
@@ -428,23 +370,210 @@
},
{
"name": "",
"id": "603f3daf-40bd-4854-8724-93e8017f59e3",
"path": "<XRController>/secondaryButton",
"id": "1c04ea5f-b012-41d1-a6f7-02e963b52893",
"path": "<Keyboard>/e",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Jump",
"groups": "Keyboard&Mouse",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f6175381-88f9-4a4c-b99f-ca84606ad42d",
"id": "b3f66d0b-7751-423f-908b-a11c5bd95930",
"path": "<Gamepad>/buttonNorth",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "36e52cba-0905-478e-a818-f4bfcb9f3b9a",
"path": "<Keyboard>/c",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Crouch",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "a2b3c4d5-e6f7-a8b9-c0d1-e2f3a4b5c6d7",
"path": "<Gamepad>/rightStickPress",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Crouch",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6",
"path": "<Keyboard>/q",
"interactions": "",
"processors": "",
"groups": "",
"action": "Previous",
"groups": "Keyboard&Mouse",
"action": "Dodge",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c1d2e3f4-a5b6-c7d8-e9f0-a1b2c3d4e5f6",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Dodge",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d1e2f3a4-b5c6-d7e8-f9a0-b1c2d3e4f5a6",
"path": "<Keyboard>/alpha1",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "StrongAttack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e1f2a3b4-c5d6-e7f8-a9b0-c1d2e3f4a5b6",
"path": "<Keyboard>/leftAlt",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "StrongAttack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f1a2b3c4-d5e6-f7a8-b9c0-d1e2f3a4b5c6",
"path": "<Gamepad>/rightTrigger",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "StrongAttack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "a1b2c3d4-e5f6-a7b8-c9d0-e1f2a3b4c5d6",
"path": "<Mouse>/rightButton",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Block",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e7",
"path": "<Gamepad>/leftShoulder",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Block",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c1d2e3f4-a5b6-c7d8-e9f0-a1b2c3d4e5f7",
"path": "<Mouse>/rightButton",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Aim",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d1e2f3a4-b5c6-d7e8-f9a0-b1c2d3e4f5a7",
"path": "<Gamepad>/leftTrigger",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Aim",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e1f2a3b4-c5d6-e7f8-a9b0-c1d2e3f4a5b7",
"path": "<Keyboard>/r",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Reload",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f1a2b3c4-d5e6-f7a8-b9c0-d1e2f3a4b5c7",
"path": "<Gamepad>/leftShoulder",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Reload",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "a1b2c3d4-e5f6-a7b8-c9d0-e1f2a3b4c5d7",
"path": "<Keyboard>/tab",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "SwitchSide",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e8",
"path": "<Gamepad>/dpad/down",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "SwitchSide",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c1d2e3f4-a5b6-c7d8-e9f0-a1b2c3d4e5f8",
"path": "<Keyboard>/z",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "ScopeView",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d1e2f3a4-b5c6-d7e8-f9a0-b1c2d3e4f5a8",
"path": "<Gamepad>/dpad/up",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "ScopeView",
"isComposite": false,
"isPartOfComposite": false
},
@@ -472,45 +601,23 @@
},
{
"name": "",
"id": "1c04ea5f-b012-41d1-a6f7-02e963b52893",
"path": "<Keyboard>/e",
"id": "cbac6039-9c09-46a1-b5f2-4e5124ccb5ed",
"path": "<Keyboard>/2",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Interact",
"action": "Next",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b3f66d0b-7751-423f-908b-a11c5bd95930",
"path": "<Gamepad>/buttonNorth",
"id": "e15ca19d-e649-4852-97d5-7fe8ccc44e94",
"path": "<Gamepad>/dpad/right",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4f4649ac-64a8-4a73-af11-b3faef356a4d",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Crouch",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "36e52cba-0905-478e-a818-f4bfcb9f3b9a",
"path": "<Keyboard>/c",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Crouch",
"action": "Next",
"isComposite": false,
"isPartOfComposite": false
},
@@ -531,7 +638,18 @@
"path": "<Keyboard>/f2",
"interactions": "",
"processors": "",
"groups": "",
"groups": "Keyboard&Mouse",
"action": "ToggleView",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f1g2h3i4-j5k6-l7m8-n9o0-p1q2r3s4t5u6",
"path": "<Mouse>/middleButton",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "ToggleView",
"isComposite": false,
"isPartOfComposite": false
@@ -539,10 +657,10 @@
{
"name": "",
"id": "048282c5-5a5b-4ab2-9777-a20889af4532",
"path": "<Gamepad>/buttonEast",
"path": "<Gamepad>/rightStickPress",
"interactions": "",
"processors": "",
"groups": "",
"groups": "Gamepad",
"action": "ToggleView",
"isComposite": false,
"isPartOfComposite": false