Files
Aura-TopDownRPG-GAS/Source/Aura/Public/UI/WidgetController/AuraWidgetController.h

60 lines
1.6 KiB
C
Raw Permalink Normal View History

2025-10-14 22:20:59 -04:00
// 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;
};