Added Ammo Icon to Images

This commit is contained in:
MH261677 2023-02-06 23:51:45 +00:00
parent 73262b425e
commit 797c447d47
6 changed files with 8 additions and 13 deletions

Binary file not shown.

BIN
Content/Images/ammoicon.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Levels/MerchantPrototype.umap (Stored with Git LFS)

Binary file not shown.

View File

@ -40,13 +40,11 @@ bool UInventoryComponent::AddItem(class UBaseItem* BaseItem)
BaseItem->StoredItems = this;
BaseItem->World = GetWorld();
bool isNewItem = true;
// for every item in inventory
for (auto & Item : Items)
{
//if the item is the same as the item that is being added
if (Item->ItemDisplayName.ToString() == BaseItem->ItemDisplayName.ToString())
{
//add the amount of the item that is being added to the item in the inventory
Item->StackCount++;
UE_LOG(LogTemp, Display, TEXT("ITEM STACKCOUNT: %d"), Item->StackCount);
isNewItem = false;

View File

@ -22,7 +22,6 @@ void UEatableItems::Use(ATempCharacter* Character)
{
Character->Health += 10;
UE_LOG(LogTemp, Display, TEXT("Healed"));
//delete itself
Character->Inventory->RemoveItem(this);
}
else if (Character->Health >= 100)
@ -37,11 +36,5 @@ void UEatableItems::Use(ATempCharacter* Character)
Character->Inventory->RemoveItem(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.
*/
}

View File

@ -33,6 +33,7 @@ void ATempCharacter::BeginPlay()
PlayerCapsule = GetCapsuleComponent();
TArray<AActor*> AllActorsInScene;
//MAKE SURE POST PROCESSING IS IN THE SCENE OR GAME WILL CRASH
UGameplayStatics::GetAllActorsOfClass(GetWorld(), APostProcessVolume::StaticClass(), AllActorsInScene);
PostProcessVolume = Cast<APostProcessVolume>(AllActorsInScene[0]);
}