Updated Inventory system for Items in UI
The Inventory System is working fully with the healing jelly working
This commit is contained in:
parent
593badeca9
commit
e602d83a31
BIN
Content/Blueprints/BP_MyTempCharacter.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/BP_MyTempCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/WBP_ItemDisplay.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/WBP_ItemDisplay.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/WBP_PlayerInventory.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/WBP_PlayerInventory.uasset
(Stored with Git LFS)
Binary file not shown.
@ -3,13 +3,24 @@
|
||||
|
||||
#include "EatableItems.h"
|
||||
|
||||
#include "the_twilight_abyss/BaseItems/InventoryComponent.h"
|
||||
#include "the_twilight_abyss/PlayerTemp/TempCharacter.h"
|
||||
|
||||
|
||||
UEatableItems::UEatableItems()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UEatableItems::Use(ATempCharacter* Character)
|
||||
{
|
||||
if(Character)
|
||||
{
|
||||
Character->Health += 10;
|
||||
|
||||
if(StoredItems)
|
||||
{
|
||||
StoredItems->Remove(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ UCLASS()
|
||||
class THE_TWILIGHT_ABYSS_API UEatableItems : public UBaseItem
|
||||
{
|
||||
GENERATED_BODY()
|
||||
UEatableItems();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user