Updated DialogueNPC for Text Animation Speed Property
This commit is contained in:
parent
acefce8bbc
commit
6310050647
@ -88,7 +88,7 @@ void UDialogueNPC::StartDialogue()
|
|||||||
DialogueIndex = 0;
|
DialogueIndex = 0;
|
||||||
NPCNameText->SetText(FText::FromString(NPCName));
|
NPCNameText->SetText(FText::FromString(NPCName));
|
||||||
CurrentDialogue = "";
|
CurrentDialogue = "";
|
||||||
GetWorld()->GetTimerManager().SetTimer(TextAnimationTimerHandle, this, &UDialogueNPC::NextCharacter, 0.05f, true);
|
GetWorld()->GetTimerManager().SetTimer(TextAnimationTimerHandle, this, &UDialogueNPC::NextCharacter, TextAnimationSpeed, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDialogueNPC::EndDialogue()
|
void UDialogueNPC::EndDialogue()
|
||||||
|
@ -34,6 +34,9 @@ public:
|
|||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
TArray<FString> Dialogue;
|
TArray<FString> Dialogue;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
float TextAnimationSpeed = 0.05f;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Called when the game starts
|
// Called when the game starts
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user