diff --git a/Content/Blueprints/BP_CrossHair.uasset b/Content/Blueprints/BP_CrossHair.uasset deleted file mode 100644 index 9f8931e..0000000 --- a/Content/Blueprints/BP_CrossHair.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a280ea28495f581d57c633b55688d29b2deee4204a9d743b96deddb02a8bc1c -size 24157 diff --git a/Content/Blueprints/BP_HealingJellyItem.uasset b/Content/Blueprints/BP_HealingJellyItem.uasset index f66b6a9..e0cef3b 100644 --- a/Content/Blueprints/BP_HealingJellyItem.uasset +++ b/Content/Blueprints/BP_HealingJellyItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9bb81fd6a904d7139d83d81f2d8fbecf448eda7710959bfa2a32faf2e2eee72 -size 29888 +oid sha256:f8b96edfd16707be503a8b2b196ed4d194946a0637b2c55ea003c05a49e6f64a +size 2398 diff --git a/Content/Blueprints/BP_Interaction.uasset b/Content/Blueprints/BP_Interaction.uasset index dcb91cb..5b52dc0 100644 --- a/Content/Blueprints/BP_Interaction.uasset +++ b/Content/Blueprints/BP_Interaction.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:42db740853a281bd78c277e9281ab2af4bdf9d0ee834045782e066ee782e9e67 -size 27990 +oid sha256:32d7c8498dcd0a175bb2c45ecdd805ba77d797164a59c8e5ac6e03f0bfb6e52c +size 2268 diff --git a/Content/Blueprints/BP_MyTempCharacter.uasset b/Content/Blueprints/BP_MyTempCharacter.uasset deleted file mode 100644 index 585dc7f..0000000 --- a/Content/Blueprints/BP_MyTempCharacter.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c720b55a9e91e62f991279ef9d043ef8e41e3282b1b1c640ddb46dd4c8efc543 -size 53356 diff --git a/Content/Blueprints/Display_UI/BP_CrossHair.uasset b/Content/Blueprints/Display_UI/BP_CrossHair.uasset new file mode 100644 index 0000000..9189850 --- /dev/null +++ b/Content/Blueprints/Display_UI/BP_CrossHair.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55196f81c7337436eb13d58addfa806a72814afb3e9745581c23b271601bb1a6 +size 24190 diff --git a/Content/Blueprints/Display_UI/WBP_Health.uasset b/Content/Blueprints/Display_UI/WBP_Health.uasset new file mode 100644 index 0000000..6d8ecc5 --- /dev/null +++ b/Content/Blueprints/Display_UI/WBP_Health.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91f6f6a94de73f379df0167a9b2eaa6ff85dcefc020cd565f965d2003f31b389 +size 28963 diff --git a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset new file mode 100644 index 0000000..8a3dc67 --- /dev/null +++ b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca5bb69435dfac54ab1c7cdb03fe4521ed1961add9ff0e9438a235b479e8a68b +size 86855 diff --git a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset new file mode 100644 index 0000000..d2d7739 --- /dev/null +++ b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4177a97bce273fa21e43e1d37185390f84f3055fe4af730ea21754e8f3715246 +size 108778 diff --git a/Content/Blueprints/Items/BP_BuffJelly.uasset b/Content/Blueprints/Items/BP_BuffJelly.uasset index c1bc784..63db595 100644 --- a/Content/Blueprints/Items/BP_BuffJelly.uasset +++ b/Content/Blueprints/Items/BP_BuffJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:334fec1c48b0bb04fe272b83310d5211cd1c78feed1a2adbbd3d13dffdffa90f -size 6726 +oid sha256:f7f80fdb01a8d28fe48b9df04675549ec7d8b76bea8d9e7709f31387a2ddee38 +size 6872 diff --git a/Content/Blueprints/Items/BP_BuffPlacedItem.uasset b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset new file mode 100644 index 0000000..f797e80 --- /dev/null +++ b/Content/Blueprints/Items/BP_BuffPlacedItem.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8d07a7506cfa31c8b9f69f4b1c314d68767a1b5596a8608137a744a3fd58116 +size 2368 diff --git a/Content/Blueprints/Items/BP_HealingJelly.uasset b/Content/Blueprints/Items/BP_HealingJelly.uasset index 65677e7..df344db 100644 --- a/Content/Blueprints/Items/BP_HealingJelly.uasset +++ b/Content/Blueprints/Items/BP_HealingJelly.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79844600695e0e7790cb68584c0c58f21af18a8872904ccd645f1ec3108da22d -size 6681 +oid sha256:f00cd0794a1bebf9ec279e08c06925fc8c70e28e5e51f21e5834b1aa89d6ab12 +size 6824 diff --git a/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset b/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset new file mode 100644 index 0000000..016dc00 --- /dev/null +++ b/Content/Blueprints/Items/ItemsInWorld/BP_BuffPlacedItem.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad2b40d361c7b3ad8a4c24cce72977f845a9ca15c9adb04e0ed639dbddef6c11 +size 31223 diff --git a/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset b/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset new file mode 100644 index 0000000..5e94613 --- /dev/null +++ b/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32388bd47d08a69c1f782c682fdf67358fb2fdd5f9dd821ed9fc97d66a0bda70 +size 31327 diff --git a/Content/Blueprints/Merchant/BP_Interaction.uasset b/Content/Blueprints/Merchant/BP_Interaction.uasset new file mode 100644 index 0000000..1c1c83b --- /dev/null +++ b/Content/Blueprints/Merchant/BP_Interaction.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2965ad13589cf50b8112f5e97941fd3e65db67ebece69401a963a630a15ce134 +size 26706 diff --git a/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset b/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset new file mode 100644 index 0000000..38dc788 --- /dev/null +++ b/Content/Blueprints/Merchant/BP_MerchantGameMode.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fafeaa8343b7186e04b9d4e83254fa951e1135f29c66e0eba4c159633d570fb2 +size 27659 diff --git a/Content/Blueprints/Merchant/Merchant_Blueprint.uasset b/Content/Blueprints/Merchant/Merchant_Blueprint.uasset new file mode 100644 index 0000000..57b9862 --- /dev/null +++ b/Content/Blueprints/Merchant/Merchant_Blueprint.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:872c89c4253c344d6d717e0125afd1ad0d2648cecb1d2b9b7b9c63c953d7a62a +size 30538 diff --git a/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset new file mode 100644 index 0000000..b1a1752 --- /dev/null +++ b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b00c78b227e5926f654f4ae7c1421f83cc57c4a186be20147347e9b694ffe960 +size 71363 diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset new file mode 100644 index 0000000..93bd6e5 --- /dev/null +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdb552dab713052cd07463c8a6cdb840878d73101872e5f076cebdb7f909b84a +size 51402 diff --git a/Content/Blueprints/WBP_ItemDisplay.uasset b/Content/Blueprints/WBP_ItemDisplay.uasset deleted file mode 100644 index 6337ca6..0000000 --- a/Content/Blueprints/WBP_ItemDisplay.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e54ac7119c349323ce6d57b3658300f982eed6ffe9922c47c13448aeb4173e8 -size 84619 diff --git a/Content/Blueprints/WBP_PlayerInventory.uasset b/Content/Blueprints/WBP_PlayerInventory.uasset deleted file mode 100644 index 1af5b3c..0000000 --- a/Content/Blueprints/WBP_PlayerInventory.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:38c83f1bddcf376360f7860312744872858e4c43b3c14d5153ae35923d9a8faf -size 96657 diff --git a/Content/Blueprints/WBP_Shop.uasset b/Content/Blueprints/WBP_Shop.uasset deleted file mode 100644 index 548aa62..0000000 --- a/Content/Blueprints/WBP_Shop.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a2f46e884f8c8bcd1bb029db2828769bdbd7a23296896f5a71bda84cd2626c7 -size 24782 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index 6a6e864..78d4a0a 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:085eef600d9d08558738acea97402875c1b986649999de674e98be2749afe503 -size 24931 +oid sha256:a8a5622a6c5baa77fc539a091380c71a185e20f8688e5ded51a48628b582a446 +size 27207 diff --git a/Content/Merchant/BP_OPENDIAL.uasset b/Content/Merchant/BP_OPENDIAL.uasset deleted file mode 100644 index fd13ac9..0000000 --- a/Content/Merchant/BP_OPENDIAL.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e3e50d88d0164a436cb9cc9eba8b4ffac17f428bf6b858db7a987a726d78ce6b -size 33581 diff --git a/Content/Merchant_Blueprint.uasset b/Content/Merchant_Blueprint.uasset deleted file mode 100644 index fb48a05..0000000 --- a/Content/Merchant_Blueprint.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a6417b56f9b2842d2ba70bedffc0f6ff3e8b428f5f84d5aa37e5cd7e8a77256d -size 30945 diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp index 30156e9..8a5a53e 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -22,39 +22,60 @@ void UInventoryComponent::BeginPlay() { Super::BeginPlay(); + //activates the AddItem function for every DefaultItem that inherits BaseItem for(auto & BaseItem : DefaultItems) { AddItem(BaseItem); - } -} - + } +} + bool UInventoryComponent::AddItem(class UBaseItem* BaseItem) { //if the items is over the maxinventoryslots then it wont add the item if (Items.Num() >= MaxItemSlots || !BaseItem) { + UE_LOG(LogTemp, Display, TEXT("THERE ARE MORE ITEMS THAN THE INVENTORY SLOTS")); return false; } BaseItem->StoredItems = this; BaseItem->World = GetWorld(); Items.Add(BaseItem); - - //Update UI + BaseItem->SubItemID++; + UE_LOG(LogTemp, Display, TEXT("ITEM HAS BEEN ADDED")); + //log the itemid + UE_LOG(LogTemp, Display, TEXT("ITEM ID: %d"), BaseItem->ItemID); + UE_LOG(LogTemp, Display, TEXT("SUBITEM ID: %d"), BaseItem->SubItemID); + + //Refreshes the inventory OnInventoryUpdated.Broadcast(); return true; } -bool UInventoryComponent::Remove(UBaseItem* BaseItem) +// remove only gets called once on the same item +bool UInventoryComponent::Remove(class UBaseItem* BaseItem) { if(BaseItem) { + UE_LOG(LogTemp, Display, TEXT("ItEM HAS BEEN REMOVED")); BaseItem->StoredItems = nullptr; BaseItem->World = nullptr; - Items.RemoveSingle(BaseItem); + if(BaseItem->SubItemID < Items.Num()) + { + Items.RemoveSingle(BaseItem); + BaseItem->SubItemID --; + UE_LOG(LogTemp, Display, TEXT("ItemRemoved")); + UE_LOG(LogTemp, Display, TEXT("SUBITEM ID: %d"), BaseItem->SubItemID); + } + //Items.RemoveSingle(BaseItem); OnInventoryUpdated.Broadcast(); // Updates UI return true; } return false; } +UBaseItem* UInventoryComponent::GetItem(int Index) +{ + return Items[Index]; +} + diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.h b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h index d2fbb5a..41476b1 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.h +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.h @@ -4,6 +4,7 @@ #include "CoreMinimal.h" #include "Components/ActorComponent.h" +#include "Items/EatableItems.h" #include "InventoryComponent.generated.h" //OUR DELEGATE IS CALLED FONINVENTORYUPDATED @@ -33,9 +34,16 @@ public: UPROPERTY(EditDefaultsOnly, Category= "Inventory") int32 MaxItemSlots; + UPROPERTY(EditDefaultsOnly, Category = "Inventory") + int MaxItemStack; + UPROPERTY(BlueprintAssignable, Category= "Inventory") FOnInventoryUpdated OnInventoryUpdated; //This is our delegate - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Items") + UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category= "Items") TArray Items; // The items currently in the inventory + + UFUNCTION(BlueprintCallable, Category= "Inventory") + class UBaseItem* GetItem(int Index); + }; diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index 1b18b3d..524269a 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -46,6 +46,18 @@ public: //The cost of the item UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Item") int ItemCostPrice; + + UPROPERTY(EditAnywhere, Category = "Item") + bool isHealingItem; + + UPROPERTY(EditAnywhere, Category = "Item") + bool isDamageBuffItem; + + UPROPERTY(EditAnywhere, Category = "Item") + int ItemID; + + UPROPERTY(EditAnywhere, Category = "Item") + int SubItemID; //reference to the UInventoryComponent script UPROPERTY() @@ -60,7 +72,4 @@ public: //This is the same as the use item class but its in BP instead UFUNCTION(BlueprintImplementableEvent) void OnUse(class ATempCharacter* Character); - - UFUNCTION(BlueprintImplementableEvent) - void OnBuy(class ATempCharacter* PurchaseItem); }; diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index c2a88fb..352aee9 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -9,33 +9,34 @@ UEatableItems::UEatableItems() { - + ItemID; + SubItemID; } void UEatableItems::Use(ATempCharacter* Character) { if(Character) { - Character->Health += 10; - + if(isHealingItem == true) + { + Character->Health += 10; + UE_LOG(LogTemp, Display, TEXT("Healed")); + } + if(isDamageBuffItem == true) + { + // need to add the damage buff functionality here + UE_LOG(LogTemp, Display, TEXT("Damage Buffed")); + } if(StoredItems) { StoredItems->Remove(this); } } + + /* + when player uses the item syrengine to debuff enemies + detect what enemie actors the player is fighting with + lower their damage by a value. + */ } -void UEatableItems::Buy(ATempCharacter* PurchaseItem) -{ - if(PurchaseItem) - { - if(PurchaseItem->GoldBalance <= 0) - { - UE_LOG(LogTemp, Display, TEXT("Not Enough Gold")); - } - else - { - PurchaseItem->GoldBalance -= ItemCostPrice; - } - } -} diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h index e189a6e..d636bcd 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h @@ -19,5 +19,4 @@ class THE_TWILIGHT_ABYSS_API UEatableItems : public UBaseItem protected: virtual void Use(class ATempCharacter* Character) override; - virtual void Buy(ATempCharacter* PurchaseItem) override; }; diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp index 237d6ee..f295c82 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp @@ -30,7 +30,13 @@ void AInteraction::Tick(float DeltaTime) void AInteraction::OnInteract() { - UUserWidget* spawnedWidget = CreateWidget(GetWorld(), Widget); - spawnedWidget->AddToViewport(0); + CurrentWidget = CreateWidget(GetWorld(), Widget); + CurrentWidget->AddToViewport(0); + FTimerHandle WidgetTimer; + GetWorldTimerManager().SetTimer(WidgetTimer, this, &AInteraction::RemoveWidget, WaitTimer, false); } +void AInteraction::RemoveWidget() +{ + CurrentWidget->RemoveFromViewport(); +} \ No newline at end of file diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.h b/Source/the_twilight_abyss/MerchantInteraction/Interaction.h index 2fa21b1..64ddcbf 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.h +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.h @@ -27,5 +27,10 @@ public: TSubclassOf Widget; virtual void OnInteract(); + virtual void RemoveWidget(); + UPROPERTY() + UUserWidget* CurrentWidget; + UPROPERTY(EditAnywhere) + float WaitTimer = 8.0f; }; diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 6171a59..ad5e537 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -1,6 +1,8 @@ // Fill out your copyright notice in the Description page of Project Settings. #include "TempCharacter.h" + +#include "IDetailTreeNode.h" #include "Blueprint/UserWidget.h" #include "the_twilight_abyss/BaseItems/InventoryComponent.h" #include "the_twilight_abyss/BaseItems/Items/BaseItem.h" @@ -14,6 +16,8 @@ ATempCharacter::ATempCharacter() PrimaryActorTick.bCanEverTick = true; Inventory = CreateDefaultSubobject("Inventory"); Inventory->MaxItemSlots = 10; + GoldBalance = GoldBalance; + Health = Health; } // Called when the game starts or when spawned @@ -70,21 +74,22 @@ void ATempCharacter::LineTraceLogic() TraceParams.AddIgnoredActor(this); - bool bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams); + bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams); if (bHit) { + //we store the GetItem function from InventoryComponent into ItemArray variable + auto ItemArray = OutHit.GetActor()->FindComponentByClass()->GetItem(0); if(OutHit.GetActor() == nullptr) { return; } - if(OutHit.GetActor()->ActorHasTag("HealingJelly")) + if(OutHit.GetActor()->FindComponentByClass()) { - if(GoldBalance >= 100) + if(GoldBalance >= ItemArray->ItemCostPrice) { - GoldBalance -= 100; + GoldBalance -= ItemArray->ItemCostPrice; + Inventory->AddItem(ItemArray); UE_LOG(LogTemp, Display, TEXT("Item Purchased")); - // UInventoryComponent* tempInventory = GetOwner()->FindComponentByClass(); - // tempInventory->AddItem(ItemToBuy); } if(GoldBalance <= 0) { @@ -109,12 +114,3 @@ void ATempCharacter::UseItem(class UBaseItem* Item) } } -void ATempCharacter::BuyItem(UBaseItem* BuyItem) -{ - if(BuyItem) - { - BuyItem->Buy(this); - BuyItem->OnBuy(this); - } -} - diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 4760f2c..972140d 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -41,19 +41,16 @@ public: void LineTraceLogic(); - UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "Health") + UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= "Health") float Health; - UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "Gold") + UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= "Gold") int GoldBalance; + UPROPERTY(VisibleDefaultsOnly, Category = "LineTrace") + bool bHit; + //Using the item in the inventory UFUNCTION(BlueprintCallable, Category= "Items") void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class - - UFUNCTION(BlueprintCallable, Category= "Items") - void BuyItem(class UBaseItem* BuyItem); - - // UPROPERTY(EditAnywhere, Category= "Items") - // UBaseItem ItemToBuy; };