This commit is contained in:
Oleg Petruny 2024-09-26 22:09:42 +02:00
parent e255fee5e2
commit 58cedb423a
15 changed files with 44 additions and 17 deletions

Binary file not shown.

BIN
Content/Levels/Level_3/L_Level3.umap (Stored with Git LFS)

Binary file not shown.

BIN
Content/Levels/Level_4/Blueprints/BP_Level4_Exit.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
Content/Levels/Level_4/Dialogues/DT_Level4_Intro.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Levels/Level_4/L_Level4.umap (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Levels/Level_4/L_Level4_BuiltData.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

View File

@ -223,10 +223,13 @@ void UDialogueManager::LockCallback(bool lock)
void UDialogueManager::BeginDestroy()
{
_timersLock.Lock();
for(auto& timer : _timers)
GetWorld()->GetTimerManager().ClearTimer(timer);
_timersLock.Unlock();
if(auto world = GetWorld())
{
_timersLock.Lock();
for(auto& timer : _timers)
world->GetTimerManager().ClearTimer(timer);
_timersLock.Unlock();
}
UObject::BeginDestroy();
}

View File

@ -16,5 +16,5 @@ void ALevel4::BeginPlay()
{
ALevelBase::BeginPlay();
CallNextState();
//CallNextState();
}

View File

@ -13,13 +13,20 @@ void AQuestManager::BeginPlay()
{
if(auto gamemode_base = UGameplayStatics::GetGameMode(GetWorld()))
{
if(auto gamemode = Cast<AMainGameModeBase>(gamemode_base))
gamemode = Cast<AMainGameModeBase>(gamemode_base);
if(gamemode)
{
gamemode->questsUpdateDelegate.AddDynamic(this, &AQuestManager::Update);
}
}
}
void AQuestManager::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
if(gamemode)
gamemode->questsUpdateDelegate.RemoveDynamic(this, &AQuestManager::Update);
}
void AQuestManager::Update(TArray<FText> quests)
{
if(auto WM = AMainGameModeBase::GetWidgetsManager())

View File

@ -16,8 +16,11 @@ public:
protected:
virtual void BeginPlay() override;
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
UFUNCTION()
void Update(TArray<FText> quests);
class AMainGameModeBase* gamemode = nullptr;
};

View File

@ -88,4 +88,6 @@ protected:
UPROPERTY(EditDefaultsOnly)
TSubclassOf<class UJournalWidget> journalWidgetClass; // hidden in pause, cutscene
class UJournalWidget* journalWidget = nullptr;
bool initialized = false;
};