DRG-Femboy-Voice/Source/FSD/Public/LookingAtWidget.h
2025-04-15 12:39:31 -07:00

83 lines
3 KiB
C++
Executable file

#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "LookingAtWidget.generated.h"
class AActor;
class APlayerCharacter;
class IHealth;
class UHealth;
class UCharacterSightComponent;
class UHealthComponentBase;
class UPawnAfflictionComponent;
UCLASS(Blueprintable, EditInlineNew)
class ULookingAtWidget : public UUserWidget {
GENERATED_BODY()
public:
protected:
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float TargetSelectDuration;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float TargetLostDuration;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
TWeakObjectPtr<APlayerCharacter> Character;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Export, Transient, meta=(AllowPrivateAccess=true))
TWeakObjectPtr<UCharacterSightComponent> CharacterSight;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
TWeakObjectPtr<AActor> CurrentTarget;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Export, Transient, meta=(AllowPrivateAccess=true))
TWeakObjectPtr<UPawnAfflictionComponent> CurrentTargetAfflictions;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
TScriptInterface<IHealth> CurrentTargetHealth;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
bool CanCurrentTargetTakeDamage;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
float TargetLostTime;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
bool bTargetSet;
public:
ULookingAtWidget();
protected:
UFUNCTION(BlueprintCallable)
void SetCurrentTarget(AActor* NewActor, const TScriptInterface<IHealth>& HealthComponent, float OverrideTargetLostTime);
UFUNCTION(BlueprintCallable)
void ResetCurrentTarget();
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void ReceiveUpdateTarget(AActor* InCurrentTarget, float DeltaTime);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void ReceiveTargetLost();
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void ReceiveNewTarget(AActor* InCurrentTarget);
UFUNCTION(BlueprintCallable, BlueprintNativeEvent, BlueprintPure)
bool IsValidTarget(AActor* TargetActor, const TScriptInterface<IHealth>& TargetHealth) const;
UFUNCTION(BlueprintCallable, BlueprintPure)
bool IsBossFight(const TScriptInterface<IHealth>& Health) const;
UFUNCTION(BlueprintCallable, BlueprintPure)
UHealthComponentBase* GetLookingAtHealth() const;
UFUNCTION(BlueprintCallable, BlueprintPure)
AActor* GetLookingAtActor() const;
UFUNCTION(BlueprintCallable, BlueprintPure)
bool GetCharacterTemperatureEffect(float& TemperatureEffect) const;
};