修改对话自动播放
This commit is contained in:
parent
cb5ac1cd58
commit
a58c41e69c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -20,7 +20,7 @@ void UTutorialManagerSubsystem::Initialize(FSubsystemCollectionBase& Collection)
|
||||
Super::Initialize(Collection);
|
||||
Collection.InitializeDependency<UGameInfoManager>();
|
||||
|
||||
DialogueUIPath = (TEXT("/Game/UI/Dialogue/UMG_DialogueWindow.UMG_DialogueWindow_C"));
|
||||
//DialogueUIPath = (TEXT("/Game/UI/Dialogue/UMG_DialogueWindow.UMG_DialogueWindow_C"));
|
||||
}
|
||||
|
||||
void UTutorialManagerSubsystem::InitSteps(TArray<FTutorialStep> Steps)
|
||||
@ -116,8 +116,18 @@ void UTutorialManagerSubsystem::OnDialogueCompleted()
|
||||
|
||||
void UTutorialManagerSubsystem::ShowDialogue()
|
||||
{
|
||||
FTimerHandle TimerHandle;
|
||||
GetWorld()->GetTimerManager().SetTimer(
|
||||
TimerHandle,
|
||||
this,
|
||||
&UTutorialManagerSubsystem::OnDialogueCompleted,
|
||||
1.0f, // 间隔时间
|
||||
true, // 是否循环
|
||||
-1.0f, // 首次延迟(-1表示使用间隔时间)
|
||||
false // bUseGameTime = false,使用真实时间
|
||||
);
|
||||
FTutorialStep CurrentStep = TutorialSteps[CurrentTutorialStep];
|
||||
UClass* WidgetClass = LoadClass<UUserWidget>(this, *DialogueUIPath);
|
||||
UClass* WidgetClass = CurrentStep.Dialogue->DialogueWidget.Get();
|
||||
if (WidgetClass)
|
||||
{
|
||||
DialogueWidget = CreateWidget<UDialogueWidget_Base>(GetWorld(), WidgetClass);
|
||||
|
||||
@ -57,7 +57,7 @@ protected:
|
||||
|
||||
TArray<FTutorialStep> TutorialSteps;
|
||||
int32 CurrentTutorialStep = 0;
|
||||
FString DialogueUIPath;
|
||||
//FString DialogueUIPath;
|
||||
UPROPERTY()
|
||||
class UDialogueWidget_Base* DialogueWidget;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user