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:
MH261677 2022-11-28 23:15:41 +00:00
parent b5772a024c
commit 8c69f58a97
3 changed files with 5 additions and 3 deletions

Binary file not shown.

View File

@ -33,7 +33,7 @@ void AInteraction::OnInteract()
CurrentWidget = CreateWidget<UUserWidget>(GetWorld(), Widget);
CurrentWidget->AddToViewport(0);
FTimerHandle WidgetTimer;
GetWorldTimerManager().SetTimer(WidgetTimer, this, &AInteraction::RemoveWidget, 5.0f, false);
GetWorldTimerManager().SetTimer(WidgetTimer, this, &AInteraction::RemoveWidget, WaitTimer, false);
}
void AInteraction::RemoveWidget()

View File

@ -30,5 +30,7 @@ public:
virtual void RemoveWidget();
UPROPERTY()
UUserWidget* CurrentWidget;
UPROPERTY(EditAnywhere)
float WaitTimer;
};