From 63100506473e35beebf5e06588207cdc4d0f13a7 Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Mon, 6 Feb 2023 01:13:17 +0000 Subject: [PATCH] Updated DialogueNPC for Text Animation Speed Property --- Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp | 2 +- Source/the_twilight_abyss/Dialogue/DialogueNPC.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp b/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp index cc5535b..50e8379 100644 --- a/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp +++ b/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp @@ -88,7 +88,7 @@ void UDialogueNPC::StartDialogue() DialogueIndex = 0; NPCNameText->SetText(FText::FromString(NPCName)); CurrentDialogue = ""; - GetWorld()->GetTimerManager().SetTimer(TextAnimationTimerHandle, this, &UDialogueNPC::NextCharacter, 0.05f, true); + GetWorld()->GetTimerManager().SetTimer(TextAnimationTimerHandle, this, &UDialogueNPC::NextCharacter, TextAnimationSpeed, true); } void UDialogueNPC::EndDialogue() diff --git a/Source/the_twilight_abyss/Dialogue/DialogueNPC.h b/Source/the_twilight_abyss/Dialogue/DialogueNPC.h index 3c084a2..a674427 100644 --- a/Source/the_twilight_abyss/Dialogue/DialogueNPC.h +++ b/Source/the_twilight_abyss/Dialogue/DialogueNPC.h @@ -34,6 +34,9 @@ public: UPROPERTY(EditAnywhere) TArray Dialogue; + UPROPERTY(EditAnywhere) + float TextAnimationSpeed = 0.05f; + protected: // Called when the game starts virtual void BeginPlay() override;