Merge pull request #34 from Games-Academy-Student-Work-22-23/merchant-polish
Merchant polish
This commit is contained in:
commit
6a94ce98ec
BIN
Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Merchant/Merchant_UI/WBP_BuyBuff.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Merchant/Merchant_UI/WBP_BuyBuff.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Merchant/Merchant_UI/WBP_BuyHealing.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Merchant/Merchant_UI/WBP_BuyHealing.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Images/MerchantUI/BLCK_ArrowLeftFilled.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/BLCK_ArrowLeftFilled.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/BLCK_ArrowLeftHollow.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/BLCK_ArrowLeftHollow.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/BLCK_ArrowLeftShadowFilled.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/BLCK_ArrowLeftShadowFilled.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/BLCK_ArrowRightFilled.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/BLCK_ArrowRightFilled.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/BLCK_ArrowRightFilledShadow.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/BLCK_ArrowRightFilledShadow.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/BLCK_ArrowRightHollowi.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/BLCK_ArrowRightHollowi.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/BuyShadow.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/BuyShadow.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/BuyUI.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/BuyUI.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/CancelShadow.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/CancelShadow.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/CancelUi.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/CancelUi.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/DialiougeBox.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/DialiougeBox.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/ExitButtonBlack.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/ExitButtonBlack.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Images/MerchantUI/ExitShadow.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Images/MerchantUI/ExitShadow.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
Binary file not shown.
@ -76,7 +76,7 @@ public:
|
||||
class UInventoryComponent* StoredItems;
|
||||
|
||||
//The buy class to purchase the item
|
||||
virtual void Buy(class ATempCharacter* PurchaseItem) PURE_VIRTUAL(UBaseItem); // WILL SET THIS UP LATER
|
||||
virtual void Buy(class ATempCharacter* BuyItem) PURE_VIRTUAL(UBaseItem); // WILL SET THIS UP LATER
|
||||
|
||||
//The use Item class to use the item in the player Inventory
|
||||
virtual void Use(class ATempCharacter* Character);
|
||||
|
@ -25,8 +25,8 @@ void AInteraction::BeginPlay()
|
||||
Super::BeginPlay();
|
||||
|
||||
//Character & Camera refs
|
||||
if (TempCharacterRef != nullptr) TempCharacterRef = Cast<ATempCharacter>(GetWorld()->GetFirstPlayerController()->GetCharacter());
|
||||
if (MainCamera != nullptr) MainCamera = Cast<UCameraComponent>(TempCharacterRef->FindComponentByClass<UCameraComponent>());
|
||||
TempCharacterRef = Cast<ATempCharacter>(GetWorld()->GetFirstPlayerController()->GetCharacter());
|
||||
MainCamera = Cast<UCameraComponent>(TempCharacterRef->FindComponentByClass<UCameraComponent>());
|
||||
//Item refs
|
||||
|
||||
TargetHealingLocation = HealingItem->GetActorLocation();
|
||||
@ -130,7 +130,14 @@ void AInteraction::CameraLeftMover()
|
||||
UE_LOG(LogTemp, Display, TEXT("Button Left is being pressed"));
|
||||
if (TempCharacterRef == nullptr || BuyHealingProperty == nullptr)
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Character not found in Interaction.cpp"));
|
||||
if (TempCharacterRef == nullptr)
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Character not found in Interaction.cpp"));
|
||||
}
|
||||
else if (BuyHealingProperty == nullptr)
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("HealingItem Not Found"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -271,19 +271,27 @@ void ATempCharacter::UseItem(class UBaseItem* Item)
|
||||
|
||||
void ATempCharacter::BuyItem(AActor* Item)
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Hit Merchant"));
|
||||
auto ItemArray = Item->FindComponentByClass<UInventoryComponent>()->GetItem(0);
|
||||
if (GoldBalance <= 0)
|
||||
if (Item == nullptr)
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Not Enough Gold"));
|
||||
UE_LOG(LogTemp, Display, TEXT("Item is null"));
|
||||
return;
|
||||
}
|
||||
else if (GoldBalance >= ItemArray->ItemCostPrice)
|
||||
else
|
||||
{
|
||||
GoldBalance -= ItemArray->ItemCostPrice;
|
||||
Inventory->AddItem(ItemArray);
|
||||
UE_LOG(LogTemp, Display, TEXT("Item Purchased"));
|
||||
UBaseItem* ItemArray = Item->FindComponentByClass<UInventoryComponent>()->GetItem(0);
|
||||
if (GoldBalance <= 0)
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Not Enough Gold"));
|
||||
}
|
||||
else if (GoldBalance >= ItemArray->ItemCostPrice)
|
||||
{
|
||||
GoldBalance -= ItemArray->ItemCostPrice;
|
||||
Inventory->AddItem(ItemArray);
|
||||
UE_LOG(LogTemp, Display, TEXT("Item Purchased"));
|
||||
}
|
||||
UE_LOG(LogTemp, Display, TEXT("BUY ITEM FIRING"));
|
||||
TraceDistance = 1000;
|
||||
LineTraceLogic();
|
||||
}
|
||||
// UE_LOG(LogTemp, Display, TEXT("BUY ITEM FIRING"));
|
||||
// TraceDistance = 1000;
|
||||
// LineTraceLogic();
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user