changed some input-related code in player charac controller

This commit is contained in:
Ji Yoon Rhee
2024-06-11 21:53:04 +09:00
parent 917a1bb668
commit 18abbad56d
3 changed files with 2 additions and 26 deletions

View File

@ -4,7 +4,6 @@
#include "HYPlayerCharacController.h"
#include "HYGameStateBase.h"
#include "hwanyoung2Character.h"
#include "EnhancedInputComponent.h"
AHYPlayerCharacController::AHYPlayerCharacController()
{
@ -48,19 +47,9 @@ void AHYPlayerCharacController::Interact()
void AHYPlayerCharacController::SetupInputComponent()
{
Super::SetupInputComponent();
if (UEnhancedInputComponent* EnhancedInputComponent = CastChecked<UEnhancedInputComponent>(InputComponent)) {
EnhancedInputComponent->BindAction(
InteractAction, ETriggerEvent::Triggered,
this, &AHYPlayerCharacController::Interact);
EnhancedInputComponent->BindAction(
ToggleInventoryAction, ETriggerEvent::Triggered,
this, &AHYPlayerCharacController::ReloadInventory);
}
}
void AHYPlayerCharacController::OnPossess(APawn* InPawn)
{
Super::OnPossess(InPawn);
}