8#include "Kismet/GameplayStatics.h"
22 EventLogService::NewEvent<UFadeOutEvent>(
nullptr,
nullptr, 0.25f);
70 auto FadeInFinishedEvent = [
this, LevelName]()
72 UGameplayStatics::OpenLevel(GetWorld(), LevelName);
76 EventLogService::NewEvent<UFadeInEvent>(
nullptr, FadeInFinishedEvent, 0.25f);
83 auto FadeInFinishedEvent = [
this]()
87 EventLogService::NewEvent<UFadeInEvent>(
nullptr, FadeInFinishedEvent, Duration);
91 auto FadeOutFinishedEvent = [](){};
92 EventLogService::NewEvent<UFadeOutEvent>(
nullptr, FadeOutFinishedEvent, Duration);
102 for (
auto It = GetWorld()->GetPlayerControllerIterator(); It; ++It)
106 PlayerController->ClientFadeIn(FadeDuration);
139 for (
auto It = GetWorld()->GetPlayerControllerIterator(); It; ++It)
143 PlayerController->ClientFadeOut(FadeDuration);
#define DEFINE_EVENT_HANDLER(TEventType)
A custom player controller class for PixoVR.
void HandleEvent_Impl(class UBaseEvent *Event)
Event used to call fade-in with auto fade-out.
Event used to call fade-in.
static bool bNewLevelFadeOut
Flag indicating whether we need to do fade-out after loading new level.
void StartFadeIn()
UFUNCTION()
void FadeInFinished()
UFUNCTION()
bool BlockFade
UPROPERTY(BlueprintReadWrite, Category = "FadeManager|Parameters")
FOnFadeInFinished OnFadeInFinished
UPROPERTY(BlueprintAssignable)
bool bAutoFadeOut
Flag indicating whether automatic fade-out after fade-in is enabled.
void FadeOutFinished() const
UFUNCTION()
TFunction< void()> FadeOutCallback
FTimerHandle FadeTimerHandler
void OpenLevelWithFade(FName LevelName)
UFUNCTION(BlueprintCallable)
TFunction< void()> FadeInCallback
void StartFadeOut()
UFUNCTION()
void ShowFade(bool FadeIn, float Duration)
Shows a fade effect.
Event used to call fade-out.