Compare commits

...

2 Commits

25 changed files with 47 additions and 40 deletions

Binary file not shown.

View File

@ -4,6 +4,7 @@
#include "HYPlayerCharacController.h"
#include "HYGameStateBase.h"
#include "hwanyoung2Character.h"
#include "EnhancedInputComponent.h"
AHYPlayerCharacController::AHYPlayerCharacController()
{
@ -48,9 +49,15 @@ void AHYPlayerCharacController::SetupInputComponent()
{
Super::SetupInputComponent();
InputComponent->BindAction(
"Interact", IE_Pressed, this,
&AHYPlayerCharacController::Interact);
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)

View File

@ -4,7 +4,7 @@
#include "HYInteractableActor.h"
#include "InventoryItem.h"
#include "InputAction.h"
#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "HYPlayerCharacController.generated.h"