Updated BP_OPENDIAL, Interaction.cpp
Changed the text in the widget and gave it a little animation. Made the Wait timer in interaction changeable in the editor.
This commit is contained in:
parent
b5772a024c
commit
8c69f58a97
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.
@ -33,7 +33,7 @@ void AInteraction::OnInteract()
|
|||||||
CurrentWidget = CreateWidget<UUserWidget>(GetWorld(), Widget);
|
CurrentWidget = CreateWidget<UUserWidget>(GetWorld(), Widget);
|
||||||
CurrentWidget->AddToViewport(0);
|
CurrentWidget->AddToViewport(0);
|
||||||
FTimerHandle WidgetTimer;
|
FTimerHandle WidgetTimer;
|
||||||
GetWorldTimerManager().SetTimer(WidgetTimer, this, &AInteraction::RemoveWidget, 5.0f, false);
|
GetWorldTimerManager().SetTimer(WidgetTimer, this, &AInteraction::RemoveWidget, WaitTimer, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AInteraction::RemoveWidget()
|
void AInteraction::RemoveWidget()
|
||||||
|
@ -30,5 +30,7 @@ public:
|
|||||||
virtual void RemoveWidget();
|
virtual void RemoveWidget();
|
||||||
UPROPERTY()
|
UPROPERTY()
|
||||||
UUserWidget* CurrentWidget;
|
UUserWidget* CurrentWidget;
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
float WaitTimer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user