GASATHON/Project/Source/Gasa/UI/WidgetController.h

49 lines
1.1 KiB
C
Raw Normal View History

#pragma once
#include "GasaCommon.h"
#include "WidgetController.generated.h"
2024-04-21 15:56:57 -07:00
USTRUCT(BlueprintType)
struct GASA_API FWidgetControllerData
{
GENERATED_BODY()
2024-04-21 21:30:29 -07:00
public:
2024-04-21 15:56:57 -07:00
FWidgetControllerData() = default;
2024-04-21 21:30:29 -07:00
FWidgetControllerData
( AGasaPlayerController* Controller
, AGasaPlayerState* PlayerState
, UAbilitySystemComponent* AbilitySystem
, UAttributeSet* Attributes )
2024-04-21 15:56:57 -07:00
: Controller(Controller)
, PlayerState(PlayerState)
, AbilitySystem(AbilitySystem)
, Attributes(Attributes)
2024-04-21 21:30:29 -07:00
{}
2024-04-21 15:56:57 -07:00
UPROPERTY(BlueprintReadOnly, Category="Player")
2024-04-21 15:56:57 -07:00
TObjectPtr<AGasaPlayerController> Controller;
UPROPERTY(BlueprintReadOnly, Category="Player")
2024-04-21 15:56:57 -07:00
TObjectPtr<AGasaPlayerState> PlayerState;
UPROPERTY(BlueprintReadOnly, Category="Player")
TObjectPtr<UAbilitySystemComponent> AbilitySystem;
UPROPERTY(BlueprintReadOnly, Category="Player")
TObjectPtr<UAttributeSet> Attributes;
};
2024-04-21 15:56:57 -07:00
UCLASS(Blueprintable)
class GASA_API UWidgetController : public UObject
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadOnly, Category="Player")
FWidgetControllerData Data;
2024-04-21 21:30:29 -07:00
UFUNCTION()
virtual void BroadcastInitialValues() {};
2024-04-21 15:56:57 -07:00
};