Updated TempCharacter.cpp
Added boolean to make inventory not open when in shop
This commit is contained in:
parent
e2f91a11b5
commit
182f54a3c8
@ -85,6 +85,7 @@ void ATempCharacter::LineTraceLogic()
|
||||
}
|
||||
if(OutHit.GetActor()->FindComponentByClass<UInventoryComponent>())
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Hit Merchant"));
|
||||
auto ItemArray = OutHit.GetActor()->FindComponentByClass<UInventoryComponent>()->GetItem(0);
|
||||
if(GoldBalance >= ItemArray->ItemCostPrice)
|
||||
{
|
||||
@ -139,6 +140,7 @@ void ATempCharacter::LineTraceLogic()
|
||||
void ATempCharacter::InputDisabler()
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Disabling playermovement"));
|
||||
disableTab = true;
|
||||
//GetWorld()->GetFirstPlayerController()->InputComponent->RemoveActionBinding("Interact", IE_Pressed);
|
||||
GetWorld()->GetFirstPlayerController()->SetIgnoreLookInput(true);
|
||||
GetWorld()->GetFirstPlayerController()->SetIgnoreMoveInput(true);
|
||||
@ -163,6 +165,7 @@ void ATempCharacter::InputDisabler()
|
||||
void ATempCharacter::InputEnabler()
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Enabling Inputs"));
|
||||
disableTab = true;
|
||||
GetWorld()->GetFirstPlayerController()->SetIgnoreLookInput(false);
|
||||
GetWorld()->GetFirstPlayerController()->SetIgnoreMoveInput(false);
|
||||
GetWorld()->GetFirstPlayerController()->bShowMouseCursor = false;
|
||||
|
@ -77,5 +77,8 @@ public:
|
||||
void BuyItem();
|
||||
|
||||
bool bShopKeeperText = false;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
bool disableTab = false;
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user