changed some input-related code in player charac controller
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user