Updated DialogueNPC for Text Animation Speed Property

This commit is contained in:
Philip W 2023-02-06 01:13:17 +00:00
parent acefce8bbc
commit 6310050647
2 changed files with 4 additions and 1 deletions

View File

@ -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()

View File

@ -34,6 +34,9 @@ public:
UPROPERTY(EditAnywhere)
TArray<FString> Dialogue;
UPROPERTY(EditAnywhere)
float TextAnimationSpeed = 0.05f;
protected:
// Called when the game starts
virtual void BeginPlay() override;