A Demo Project for the UnrealEngineSDK
|
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>
Public Member Functions | |
UFadeManager () | |
DECLARE_EVENT_HANDLER (UFadeInAndFadeOutEvent) | |
DECLARE_EVENT_HANDLER (UFadeInEvent) | |
DECLARE_EVENT_HANDLER (UFadeOutEvent) | |
APlayerController * | GetPrivateOwner () 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 |
APlayerController * | PrivateOwner |
UPROPERTY() | |
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.
|
privateinherited |
Definition at line 56 of file BaseManager.h.
|
privateinherited |
Definition at line 55 of file BaseManager.h.
|
privateinherited |
Definition at line 74 of file BaseManager.h.
UFadeManager::UFadeManager | ( | ) |
Definition at line 12 of file FadeManager.cpp.
UFadeManager::DECLARE_EVENT_HANDLER | ( | UFadeInAndFadeOutEvent | ) |
UFadeManager::DECLARE_EVENT_HANDLER | ( | UFadeInEvent | ) |
UFadeManager::DECLARE_EVENT_HANDLER | ( | UFadeOutEvent | ) |
|
private |
UFUNCTION()
Definition at line 111 of file FadeManager.cpp.
|
private |
UFUNCTION()
Definition at line 148 of file FadeManager.cpp.
|
private |
|
inlineinherited |
|
inherited |
Definition at line 11 of file BaseManager.cpp.
|
protectedinherited |
Definition at line 24 of file BaseManager.cpp.
|
BlueprintCallable |
UFUNCTION(BlueprintCallable)
Definition at line 67 of file FadeManager.cpp.
|
inlineinherited |
Definition at line 40 of file BaseManager.h.
|
inlineinherited |
Definition at line 46 of file BaseManager.h.
|
BlueprintCallable |
Shows a fade effect.
FadeIn | Determines if the fade effect is a fade-in or fade-out. |
Duration | The duration of the fade effect. |
UFUNCTION(BlueprintCallable)
Definition at line 79 of file FadeManager.cpp.
|
private |
UFUNCTION()
Definition at line 96 of file FadeManager.cpp.
|
private |
UFUNCTION()
Definition at line 133 of file FadeManager.cpp.
|
protected |
Flag indicating whether automatic fade-out after fade-in is enabled.
Definition at line 84 of file FadeManager.h.
|
BlueprintReadWrite |
UPROPERTY(BlueprintReadWrite, Category = "FadeManager|Parameters")
Definition at line 59 of file FadeManager.h.
|
staticprotected |
Flag indicating whether we need to do fade-out after loading new level.
Definition at line 86 of file FadeManager.h.
|
protected |
Definition at line 82 of file FadeManager.h.
|
private |
Definition at line 91 of file FadeManager.h.
|
protected |
Definition at line 81 of file FadeManager.h.
|
private |
Definition at line 92 of file FadeManager.h.
|
protected |
Definition at line 83 of file FadeManager.h.
|
protected |
Definition at line 80 of file FadeManager.h.
|
protectedinherited |
Definition at line 77 of file BaseManager.h.
|
protected |
Definition at line 88 of file FadeManager.h.
|
BlueprintAssignable |
UPROPERTY(BlueprintAssignable)
Definition at line 53 of file FadeManager.h.
|
privateinherited |
UPROPERTY()
Definition at line 53 of file BaseManager.h.