Updated EatableItems for AmmoFunctionality
Added ammo base functionality for using the ammo item in game
This commit is contained in:
parent
797c447d47
commit
324f062cc7
BIN
Content/Levels/MerchantPrototype.umap
(Stored with Git LFS)
BIN
Content/Levels/MerchantPrototype.umap
(Stored with Git LFS)
Binary file not shown.
@ -53,6 +53,9 @@ public:
|
||||
UPROPERTY(EditAnywhere, Category = "Item")
|
||||
bool isDamageBuffItem;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category = "Item")
|
||||
bool isAmmoItemType;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item")
|
||||
int32 StackCount = 1;
|
||||
|
||||
|
@ -16,7 +16,7 @@ void UEatableItems::Use(ATempCharacter* Character)
|
||||
{
|
||||
if(Character)
|
||||
{
|
||||
if(isHealingItem == true)
|
||||
if(isHealingItem)
|
||||
{
|
||||
if (Character->Health < 100)
|
||||
{
|
||||
@ -29,12 +29,19 @@ void UEatableItems::Use(ATempCharacter* Character)
|
||||
UE_LOG(LogTemp, Display, TEXT("Health is full"));
|
||||
}
|
||||
}
|
||||
if(isDamageBuffItem == true)
|
||||
|
||||
if(isDamageBuffItem)
|
||||
{
|
||||
// need to add the damage buff functionality here
|
||||
UE_LOG(LogTemp, Display, TEXT("Damage Buffed"));
|
||||
Character->Inventory->RemoveItem(this);
|
||||
}
|
||||
|
||||
if (isAmmoItemType)
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("ADD AMMO FUNCTIONALITY HERE"));
|
||||
Character->Inventory->RemoveItem(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user