60 lines
1.6 KiB
C++
60 lines
1.6 KiB
C++
// Copyright Echo Devgroup
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "AbilitySystemComponent.h"
|
|
#include "AuraWidgetController.generated.h"
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FWidgetControllerParams
|
|
{
|
|
GENERATED_BODY()
|
|
FWidgetControllerParams(){}
|
|
FWidgetControllerParams(APlayerController* PC, APlayerState* PS, UAbilitySystemComponent* ASC, UAttributeSet* AS)
|
|
: PlayerController(PC), PlayerState(PS), AbilitySystemComponent(ASC), AttributeSet(AS){}
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
TObjectPtr<APlayerController> PlayerController = nullptr;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
TObjectPtr<APlayerState> PlayerState = nullptr;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
TObjectPtr<UAbilitySystemComponent> AbilitySystemComponent = nullptr;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
TObjectPtr<UAttributeSet> AttributeSet = nullptr;
|
|
};
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class AURA_API UAuraWidgetController : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void SetWidgetControllerParams(FWidgetControllerParams WCParams);
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
virtual void BroadcastInitialValues();
|
|
virtual void BindCallbacksToDependencies();
|
|
|
|
protected:
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "Widget Controller")
|
|
TObjectPtr<APlayerController> PlayerController;
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "Widget Controller")
|
|
TObjectPtr<APlayerState> PlayerState;
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "Widget Controller")
|
|
TObjectPtr<UAbilitySystemComponent> AbilitySystemComponent;
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "Widget Controller")
|
|
TObjectPtr<UAttributeSet> AttributeSet;
|
|
|
|
};
|