Merge remote-tracking branch 'origin/main' into fmod-integration

This commit is contained in:
benroshio 2024-06-11 16:07:25 -04:00
commit d5df643577
54 changed files with 111 additions and 92 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -4,7 +4,6 @@
#include "HYPlayerCharacController.h" #include "HYPlayerCharacController.h"
#include "HYGameStateBase.h" #include "HYGameStateBase.h"
#include "hwanyoung2Character.h" #include "hwanyoung2Character.h"
#include "EnhancedInputComponent.h"
AHYPlayerCharacController::AHYPlayerCharacController() AHYPlayerCharacController::AHYPlayerCharacController()
{ {
@ -48,19 +47,9 @@ void AHYPlayerCharacController::Interact()
void AHYPlayerCharacController::SetupInputComponent() void AHYPlayerCharacController::SetupInputComponent()
{ {
Super::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) void AHYPlayerCharacController::OnPossess(APawn* InPawn)
{ {
Super::OnPossess(InPawn);
} }

View File

@ -4,7 +4,6 @@
#include "HYInteractableActor.h" #include "HYInteractableActor.h"
#include "InventoryItem.h" #include "InventoryItem.h"
#include "InputAction.h"
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "GameFramework/PlayerController.h" #include "GameFramework/PlayerController.h"
#include "HYPlayerCharacController.generated.h" #include "HYPlayerCharacController.generated.h"
@ -44,18 +43,6 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 InventoryWeightLimit; int32 InventoryWeightLimit;
/** MappingContext */
UPROPERTY(EditAnywhere, Category = Input, meta = (AllowPrivateAccess = "true"))
class UInputMappingContext* InputMapping;
/** Toggle inventory GUI Input Action */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
class UInputAction* ToggleInventoryAction;
/** Interact Input Action */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
class UInputAction* InteractAction;
#pragma endregion #pragma endregion

View File

@ -118,6 +118,9 @@ void Ahwanyoung2Character::SetupPlayerInputComponent(class UInputComponent* Play
//Moving //Moving
EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &Ahwanyoung2Character::Move); EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &Ahwanyoung2Character::Move);
//Walking
EnhancedInputComponent->BindAction(WalkAction, ETriggerEvent::Triggered, this, &Ahwanyoung2Character::Move);
//Looking //Looking
EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &Ahwanyoung2Character::Look); EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &Ahwanyoung2Character::Look);

View File

@ -43,6 +43,10 @@ class Ahwanyoung2Character : public ACharacter
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
class UInputAction* LookAction; class UInputAction* LookAction;
/** Walk Input Action */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
class UInputAction* WalkAction;
#pragma endregion #pragma endregion
private: private:
@ -51,7 +55,6 @@ private:
public: public:
Ahwanyoung2Character(); Ahwanyoung2Character();
//Updates the AbilitysystemComponent's actorInfo, especially in a multiplayer environment //Updates the AbilitysystemComponent's actorInfo, especially in a multiplayer environment
@ -65,6 +68,7 @@ public:
UFUNCTION(BlueprintCallable, Category = "HY_Character|Camera") UFUNCTION(BlueprintCallable, Category = "HY_Character|Camera")
FVector GetStartingCameraBoomLocation(); FVector GetStartingCameraBoomLocation();
/** Returns CameraBoom subobject **/ /** Returns CameraBoom subobject **/
class USpringArmComponent* GetCameraBoom() const { return CameraBoom; } class USpringArmComponent* GetCameraBoom() const { return CameraBoom; }
/** Returns FollowCamera subobject **/ /** Returns FollowCamera subobject **/