A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
UFadeManager Class ReferenceBlueprintType

Manager that provides functionality for handling fade-in and fade-out effects for player. The class handles fade-in and fade-out events and also provides functions to open levels with fade effects and show fades. It also includes callbacks for fade-in and fade-out events. More...

#include <FadeManager.h>

Inheritance diagram for UFadeManager:
[legend]

Public Member Functions

 UFadeManager ()
 
 DECLARE_EVENT_HANDLER (UFadeInAndFadeOutEvent)
 
 DECLARE_EVENT_HANDLER (UFadeInEvent)
 
 DECLARE_EVENT_HANDLER (UFadeOutEvent)
 
APlayerControllerGetPrivateOwner () const
 
void HandleEvent (UBaseEvent *Event)
 
void OpenLevelWithFade (FName LevelName)
 UFUNCTION(BlueprintCallable)
 
template<typename TEventType , typename... TInitializeArgs>
void SendEvent (TInitializeArgs... Arguments)
 
void SetPrivateOwner (APlayerController *Owner)
 
void ShowFade (bool FadeIn, float Duration)
 Shows a fade effect.
 

Public Attributes

bool BlockFade = false
 UPROPERTY(BlueprintReadWrite, Category = "FadeManager|Parameters")
 
FOnFadeInFinished OnFadeInFinished
 UPROPERTY(BlueprintAssignable)
 

Protected Member Functions

void HandleEvent_Impl (class UBaseEvent *Event)
 

Protected Attributes

bool bAutoFadeOut
 Flag indicating whether automatic fade-out after fade-in is enabled.
 
float FadeDelay
 
float FadeInDuration
 
float FadeOutDuration
 
FTimerHandle FadeTimerHandler
 
THandlers Handlers
 
float MinFadeTime = FLT_MIN
 

Static Protected Attributes

static bool bNewLevelFadeOut = false
 Flag indicating whether we need to do fade-out after loading new level.
 

Private Types

using THandler = TFunction<void(UBaseEvent*)>
 
using THandlerKey = UClass*
 
using THandlers = std::unordered_map<THandlerKey, THandler, THandlerHash, THandlerComp>
 

Private Member Functions

void FadeInFinished ()
 UFUNCTION()
 
void FadeOutFinished () const
 UFUNCTION()
 
 GENERATED_BODY ()
 
void StartFadeIn ()
 UFUNCTION()
 
void StartFadeOut ()
 UFUNCTION()
 

Private Attributes

TFunction< void()> FadeInCallback
 
TFunction< void()> FadeOutCallback
 
APlayerControllerPrivateOwner
 UPROPERTY()
 

Detailed Description

Manager that provides functionality for handling fade-in and fade-out effects for player. The class handles fade-in and fade-out events and also provides functions to open levels with fade effects and show fades. It also includes callbacks for fade-in and fade-out events.

UCLASS(BlueprintType)

Definition at line 20 of file FadeManager.h.

Member Typedef Documentation

◆ THandler

using UBaseManager::THandler = TFunction<void(UBaseEvent*)>
privateinherited

Definition at line 56 of file BaseManager.h.

◆ THandlerKey

using UBaseManager::THandlerKey = UClass*
privateinherited

Definition at line 55 of file BaseManager.h.

◆ THandlers

using UBaseManager::THandlers = std::unordered_map<THandlerKey, THandler, THandlerHash, THandlerComp>
privateinherited

Definition at line 74 of file BaseManager.h.

Constructor & Destructor Documentation

◆ UFadeManager()

UFadeManager::UFadeManager ( )

Definition at line 12 of file FadeManager.cpp.

Member Function Documentation

◆ DECLARE_EVENT_HANDLER() [1/3]

UFadeManager::DECLARE_EVENT_HANDLER ( UFadeInAndFadeOutEvent )

◆ DECLARE_EVENT_HANDLER() [2/3]

UFadeManager::DECLARE_EVENT_HANDLER ( UFadeInEvent )

◆ DECLARE_EVENT_HANDLER() [3/3]

UFadeManager::DECLARE_EVENT_HANDLER ( UFadeOutEvent )

◆ FadeInFinished()

void UFadeManager::FadeInFinished ( )
private

UFUNCTION()

Definition at line 111 of file FadeManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FadeOutFinished()

void UFadeManager::FadeOutFinished ( ) const
private

UFUNCTION()

Definition at line 148 of file FadeManager.cpp.

Here is the caller graph for this function:

◆ GENERATED_BODY()

UFadeManager::GENERATED_BODY ( )
private

◆ GetPrivateOwner()

APlayerController * UBaseManager::GetPrivateOwner ( ) const
inlineinherited

Definition at line 47 of file BaseManager.h.

Here is the caller graph for this function:

◆ HandleEvent()

void UBaseManager::HandleEvent ( UBaseEvent * Event)
inherited

Definition at line 11 of file BaseManager.cpp.

◆ HandleEvent_Impl()

void UBaseManager::HandleEvent_Impl ( class UBaseEvent * Event)
protectedinherited

Definition at line 24 of file BaseManager.cpp.

◆ OpenLevelWithFade()

void UFadeManager::OpenLevelWithFade ( FName LevelName)
BlueprintCallable

UFUNCTION(BlueprintCallable)

Definition at line 67 of file FadeManager.cpp.

◆ SendEvent()

template<typename TEventType , typename... TInitializeArgs>
void UBaseManager::SendEvent ( TInitializeArgs... Arguments)
inlineinherited

Definition at line 40 of file BaseManager.h.

◆ SetPrivateOwner()

void UBaseManager::SetPrivateOwner ( APlayerController * Owner)
inlineinherited

Definition at line 46 of file BaseManager.h.

◆ ShowFade()

void UFadeManager::ShowFade ( bool FadeIn,
float Duration )
BlueprintCallable

Shows a fade effect.

Parameters
FadeInDetermines if the fade effect is a fade-in or fade-out.
DurationThe duration of the fade effect.

UFUNCTION(BlueprintCallable)

Definition at line 79 of file FadeManager.cpp.

◆ StartFadeIn()

void UFadeManager::StartFadeIn ( )
private

UFUNCTION()

Definition at line 96 of file FadeManager.cpp.

Here is the call graph for this function:

◆ StartFadeOut()

void UFadeManager::StartFadeOut ( )
private

UFUNCTION()

Definition at line 133 of file FadeManager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ bAutoFadeOut

bool UFadeManager::bAutoFadeOut
protected

Flag indicating whether automatic fade-out after fade-in is enabled.

Definition at line 84 of file FadeManager.h.

◆ BlockFade

bool UFadeManager::BlockFade = false
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite, Category = "FadeManager|Parameters")

Definition at line 59 of file FadeManager.h.

◆ bNewLevelFadeOut

bool UFadeManager::bNewLevelFadeOut = false
staticprotected

Flag indicating whether we need to do fade-out after loading new level.

Definition at line 86 of file FadeManager.h.

◆ FadeDelay

float UFadeManager::FadeDelay
protected

Definition at line 82 of file FadeManager.h.

◆ FadeInCallback

TFunction<void()> UFadeManager::FadeInCallback
private

Definition at line 91 of file FadeManager.h.

◆ FadeInDuration

float UFadeManager::FadeInDuration
protected

Definition at line 81 of file FadeManager.h.

◆ FadeOutCallback

TFunction<void()> UFadeManager::FadeOutCallback
private

Definition at line 92 of file FadeManager.h.

◆ FadeOutDuration

float UFadeManager::FadeOutDuration
protected

Definition at line 83 of file FadeManager.h.

◆ FadeTimerHandler

FTimerHandle UFadeManager::FadeTimerHandler
protected

Definition at line 80 of file FadeManager.h.

◆ Handlers

THandlers UBaseManager::Handlers
protectedinherited

Definition at line 77 of file BaseManager.h.

◆ MinFadeTime

float UFadeManager::MinFadeTime = FLT_MIN
protected

Definition at line 88 of file FadeManager.h.

◆ OnFadeInFinished

FOnFadeInFinished UFadeManager::OnFadeInFinished
BlueprintAssignable

UPROPERTY(BlueprintAssignable)

Definition at line 53 of file FadeManager.h.

◆ PrivateOwner

APlayerController* UBaseManager::PrivateOwner
privateinherited

UPROPERTY()

Definition at line 53 of file BaseManager.h.


The documentation for this class was generated from the following files: