A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
FadeManager.h
Go to the documentation of this file.
1// Copyright(c) Pixo Group. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "FadeManager.generated.h"
8
10
16UCLASS(BlueprintType)
17class PIXOCORE_API UFadeManager : public UBaseManager
18{
21public:
22 //Manager event declaration
27public:
29
30 UFUNCTION(BlueprintCallable)
31 void OpenLevelWithFade(FName LevelName);
37 UFUNCTION(BlueprintCallable)
38 void ShowFade(bool FadeIn, float Duration);
39
40 UPROPERTY(BlueprintAssignable)
41 FOnFadeInFinished OnFadeInFinished;
42
43 UPROPERTY(BlueprintReadWrite, Category = "FadeManager|Parameters")
44 bool BlockFade = false;
45
46private:
47 UFUNCTION()
48 void StartFadeIn();
49 UFUNCTION()
50 void FadeInFinished();
51 UFUNCTION()
52 void StartFadeOut();
53 UFUNCTION()
54 void FadeOutFinished() const;
55
56protected:
57 FTimerHandle FadeTimerHandler;
58 float FadeInDuration;
59 float FadeDelay;
60 float FadeOutDuration;
61 bool bAutoFadeOut;
62
63 static bool bNewLevelFadeOut;
64
65 float MinFadeTime = FLT_MIN;
66
67private:
68 TFunction<void()> FadeInCallback;
69 TFunction<void()> FadeOutCallback;
70};
#define DECLARE_EVENT_HANDLER(TEvent)
Definition BaseManager.h:11
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnFadeInFinished)
@ FadeIn
It provides functionalities for handling events, sending events, and managing a private owner....
Definition BaseManager.h:32
Event used to call fade-in with auto fade-out.
Event used to call fade-in.
Definition FadeInEvent.h:16
Manager that provides functionality for handling fade-in and fade-out effects for player....
Definition FadeManager.h:21
static bool bNewLevelFadeOut
Flag indicating whether we need to do fade-out after loading new level.
Definition FadeManager.h:86
float FadeInDuration
Definition FadeManager.h:81
FOnFadeInFinished OnFadeInFinished
UPROPERTY(BlueprintAssignable)
Definition FadeManager.h:53
bool bAutoFadeOut
Flag indicating whether automatic fade-out after fade-in is enabled.
Definition FadeManager.h:84
TFunction< void()> FadeOutCallback
Definition FadeManager.h:92
FTimerHandle FadeTimerHandler
Definition FadeManager.h:80
DECLARE_EVENT_HANDLER(UFadeInAndFadeOutEvent)
DECLARE_EVENT_HANDLER(UFadeInEvent)
TFunction< void()> FadeInCallback
Definition FadeManager.h:91
float FadeDelay
Definition FadeManager.h:82
DECLARE_EVENT_HANDLER(UFadeOutEvent)
float FadeOutDuration
Definition FadeManager.h:83
Event used to call fade-out.