i'm losing my mind wtf is this

This commit is contained in:
Ji Yoon Rhee
2023-12-26 23:33:12 +09:00
parent 6235bcb85c
commit ce5240bfd9
29 changed files with 2790 additions and 1908 deletions

View File

@ -5,15 +5,24 @@
AHYPlayerCharacController::AHYPlayerCharacController()
{
//this is hardcoding the limits:
InventorySlotLimit = 50;
InventoryWeightLimit = 500;
}
void AHYPlayerCharacController::ReloadInventory()
{
}
int32 AHYPlayerCharacController::GetInventoryWeight()
{
return int32();
int32 TotalWeight = 0;
for (auto& Item : Inventory) {
TotalWeight += 1; //hard coding for now
}
return TotalWeight;
}
bool AHYPlayerCharacController::AddItemToInventoryByID(FName ID)
@ -21,6 +30,15 @@ bool AHYPlayerCharacController::AddItemToInventoryByID(FName ID)
return false;
}
void AHYPlayerCharacController::Interact()
{
}
void AHYPlayerCharacController::SetupInputComponent()
{
Super::SetupInputComponent();
}
void AHYPlayerCharacController::OnPossess(APawn* InPawn)
{

View File

@ -47,8 +47,11 @@ public:
protected:
//interacts with the Interactable objects
void Interact();
//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;

View File

@ -3,4 +3,6 @@
#include "InventoryItem.h"
FInventoryItem::FInventoryItem()
{
}

View File

@ -13,7 +13,7 @@
USTRUCT(BlueprintType)
struct FInventoryItem : public FTableRowBase
{
//GENERATED_USTRUCT_BODY();
GENERATED_USTRUCT_BODY();
public:
FInventoryItem();
};

View File

@ -13,7 +13,7 @@
#include "GameFramework/SpringArmComponent.h"
#include "EnhancedInputComponent.h"
#include "EnhancedInputSubsystems.h"
#include "Interactable.h"
#include "HYInteractableActor.h"
#include "InventoryItem.h"