ArticyXImporter
ArticyXImporter for Unreal Engine
Loading...
Searching...
No Matches
ShadowStateManager.h
1//
2// Copyright (c) 2023 articy Software GmbH & Co. KG. All rights reserved.
3//
4
5#pragma once
6
7#include "UObject/Interface.h"
8#include "ShadowStateManager.generated.h"
9
10// This class does not need to be modified.
11UINTERFACE(MinimalAPI)
12class UShadowStateManager : public UInterface
13{
14 GENERATED_BODY()
15};
16
24{
25 GENERATED_BODY()
26
27 // Add interface functions to this class. This is the class that will be inherited to implement this interface.
28public:
29
30 DECLARE_MULTICAST_DELEGATE(FOnPopState)
31
32 template<typename LambdaType>
33 FDelegateHandle RegisterOnPopState(LambdaType Lambda);
34 void UnregisterOnPopState(FDelegateHandle Delegate);
35
36 uint32 GetShadowLevel() const { return ShadowLevel; }
37
38private:
39
41 uint32 ShadowLevel = 0;
42
44 TArray<FOnPopState> OnPopStateDelegates;
45
46 friend class UArticyFlowPlayer;
47
48 void PushState(uint32 NewShadowLevel);
49 void PopState(uint32 CurrShadowLevel);
50};
51
52template <typename LambdaType>
53FDelegateHandle IShadowStateManager::RegisterOnPopState(LambdaType Lambda)
54{
55 return OnPopStateDelegates.Last().AddLambda(Lambda);
56}
Definition ShadowStateManager.h:24
Definition ShadowStateManager.h:13