Updated Quest UI to Display Tasks

This commit is contained in:
Philip W 2023-03-13 18:11:42 +00:00
parent 3a99e71bde
commit af86084f3e
6 changed files with 12 additions and 9 deletions

Binary file not shown.

BIN
Content/Dialogue/DialogueTest.umap (Stored with Git LFS)

Binary file not shown.

BIN
Content/Dialogue/NPCTest.uasset (Stored with Git LFS)

Binary file not shown.

View File

@ -13,7 +13,7 @@ UDialogueNPC::UDialogueNPC()
// off to improve performance if you don't need them.
PrimaryComponentTick.bCanEverTick = true;
static ConstructorHelpers::FClassFinder<UUserWidget> DialogueWidgetClass(TEXT("/Game/Dialogue/TextPrompt"));
static ConstructorHelpers::FClassFinder<UUserWidget> DialogueWidgetClass(TEXT("/Game/Blueprints/Quest_UI/Quest_UI"));
DialogueWidget = DialogueWidgetClass.Class;
}

View File

@ -11,7 +11,8 @@ UQuestSystem::UQuestSystem()
// off to improve performance if you don't need them.
PrimaryComponentTick.bCanEverTick = true;
// ...
static ConstructorHelpers::FClassFinder<UUserWidget> QuestWidgetClass(TEXT("/Game/Dialogue/TextPrompt"));
QuestWidget = QuestWidgetClass.Class;
}
@ -20,7 +21,6 @@ void UQuestSystem::BeginPlay()
{
Super::BeginPlay();
// ...
}
@ -30,6 +30,5 @@ void UQuestSystem::TickComponent(float DeltaTime, ELevelTick TickType, FActorCom
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
// ...
}

View File

@ -4,6 +4,7 @@
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "Components/TextBlock.h"
#include "QuestSystem.generated.h"
@ -20,6 +21,9 @@ protected:
// Called when the game starts
virtual void BeginPlay() override;
UPROPERTY()
TSubclassOf<UUserWidget> QuestWidget;
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;