// 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 PlayerController = nullptr; UPROPERTY(EditAnywhere, BlueprintReadWrite) TObjectPtr PlayerState = nullptr; UPROPERTY(EditAnywhere, BlueprintReadWrite) TObjectPtr AbilitySystemComponent = nullptr; UPROPERTY(EditAnywhere, BlueprintReadWrite) TObjectPtr 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 PlayerController; UPROPERTY(BlueprintReadOnly, Category = "Widget Controller") TObjectPtr PlayerState; UPROPERTY(BlueprintReadOnly, Category = "Widget Controller") TObjectPtr AbilitySystemComponent; UPROPERTY(BlueprintReadOnly, Category = "Widget Controller") TObjectPtr AttributeSet; };