RealtimeStyleTransferRuntime/Source/LyraGame/UI/IndicatorSystem/LyraIndicatorManagerCompone...

46 lines
1.3 KiB
C
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Components/ControllerComponent.h"
2022-09-13 07:18:28 +00:00
#include "Containers/Array.h"
#include "Delegates/Delegate.h"
#include "UObject/UObjectGlobals.h"
2022-05-23 18:41:30 +00:00
#include "LyraIndicatorManagerComponent.generated.h"
2022-09-13 07:18:28 +00:00
class AController;
2022-05-23 18:41:30 +00:00
class UIndicatorDescriptor;
2022-09-13 07:18:28 +00:00
class UObject;
struct FFrame;
2022-05-23 18:41:30 +00:00
/**
* @class ULyraIndicatorManagerComponent
*/
UCLASS(BlueprintType, Blueprintable)
class LYRAGAME_API ULyraIndicatorManagerComponent : public UControllerComponent
{
GENERATED_BODY()
public:
ULyraIndicatorManagerComponent(const FObjectInitializer& ObjectInitializer);
static ULyraIndicatorManagerComponent* GetComponent(AController* Controller);
UFUNCTION(BlueprintCallable, Category = Indicator)
void AddIndicator(UIndicatorDescriptor* IndicatorDescriptor);
UFUNCTION(BlueprintCallable, Category = Indicator)
void RemoveIndicator(UIndicatorDescriptor* IndicatorDescriptor);
DECLARE_EVENT_OneParam(ULyraIndicatorManagerComponent, FIndicatorEvent, UIndicatorDescriptor* Descriptor)
FIndicatorEvent OnIndicatorAdded;
FIndicatorEvent OnIndicatorRemoved;
const TArray<UIndicatorDescriptor*>& GetIndicators() const { return Indicators; }
private:
UPROPERTY()
2022-09-13 07:18:28 +00:00
TArray<TObjectPtr<UIndicatorDescriptor>> Indicators;
2022-05-23 18:41:30 +00:00
};