Added Ammo Icon to Images
This commit is contained in:
parent
73262b425e
commit
797c447d47
BIN
Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Images/ammoicon.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/ammoicon.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Levels/MerchantPrototype.umap
(Stored with Git LFS)
BIN
Content/Levels/MerchantPrototype.umap
(Stored with Git LFS)
Binary file not shown.
@ -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;
|
||||
|
@ -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.
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user