i'm losing my mind wtf is this
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
||||
|
@ -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;
|
||||
|
@ -3,4 +3,6 @@
|
||||
|
||||
#include "InventoryItem.h"
|
||||
|
||||
|
||||
FInventoryItem::FInventoryItem()
|
||||
{
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
USTRUCT(BlueprintType)
|
||||
struct FInventoryItem : public FTableRowBase
|
||||
{
|
||||
//GENERATED_USTRUCT_BODY();
|
||||
GENERATED_USTRUCT_BODY();
|
||||
public:
|
||||
FInventoryItem();
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "GameFramework/SpringArmComponent.h"
|
||||
#include "EnhancedInputComponent.h"
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
#include "Interactable.h"
|
||||
#include "HYInteractableActor.h"
|
||||
#include "InventoryItem.h"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user