Illusion-UE5/hwanyoung2/Source/hwanyoung2/HYPlayerCharacController.h
2024-06-17 23:38:43 +09:00

61 lines
1.4 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "HYInteractableActor.h"
#include "InventoryItem.h"
#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "HYPlayerCharacController.generated.h"
/**
*
*/
UCLASS()
class HWANYOUNG2_API AHYPlayerCharacController : public APlayerController
{
GENERATED_BODY()
public:
#pragma region inventory
//setting up the controller inventory
AHYPlayerCharacController();
UFUNCTION(BlueprintImplementableEvent)
void ReloadInventory();
UFUNCTION(BlueprintCallable, Category = "Utils")
int32 GetInventoryWeight();
UFUNCTION(BlueprintCallable, Category = "Utils")
bool AddItemToInventoryByID(FName ID);
UPROPERTY(BlueprintReadWrite, VisibleAnywhere)
class AHYInteractableActor* CurrentInteractable;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
TArray<FInventoryItem> Inventory;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 InventorySlotLimit;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 InventoryWeightLimit;
//interacts with the Interactable objects
UFUNCTION(BlueprintCallable, Category = "Utils")
void Interact();
#pragma endregion
protected:
//abstract function to override in order to
//bind actions or axis to different input components
virtual void SetupInputComponent() override;
virtual void OnPossess(APawn* InPawn) override;
};