From 2a590c3e33a54319799f7ee21a3f3480da42b371 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 29 Nov 2022 12:43:58 +0000 Subject: [PATCH] Updated InventoryComponent,TempCharacter Commented InventoryComponent to understand logic easier and removed unused functions from TempCharacter --- Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp | 1 + Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp index fc8a784..9fc609d 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -22,6 +22,7 @@ void UInventoryComponent::BeginPlay() { Super::BeginPlay(); + //activates the AddItem function for every DefaultItem that inherits BaseItem for(auto & BaseItem : DefaultItems) { AddItem(BaseItem); diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 4147e2b..972140d 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -53,7 +53,4 @@ public: //Using the item in the inventory UFUNCTION(BlueprintCallable, Category= "Items") void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class - - UPROPERTY(EditAnywhere, Category= "Items") - UBaseItem* ItemToBuy; };