8#include "Kismet/GameplayStatics.h"
70 auto FadeInFinishedEvent = [
this, LevelName]()
72 UGameplayStatics::OpenLevel(GetWorld(), LevelName);
83 auto FadeInFinishedEvent = [
this]()
91 auto FadeOutFinishedEvent = [](){};
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.
static FUNCTION_NON_NULL_RETURN_START TEventType * NewEvent(APlayerController *Executor=nullptr) FUNCTION_NON_NULL_RETURN_END
Creates a new event of the specified type.
void HandleEvent_Impl(class UBaseEvent *Event)
TFunction< void()> && GetCallbackFunction()
Event used to call fade-in with auto fade-out.
float GetFadeInDuration() const
TFunction< void()> && GetFadeOutCallbackFunction()
float GetFadeOutDuration() const
float GetFadeDelay() const
TFunction< void()> && GetFadeInCallbackFunction()
Event used to call fade-in.
float GetFadeInDuration() const
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.
float GetFadeOutDuration() const