#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 Character; UPROPERTY(BlueprintReadWrite, EditAnywhere, Export, Transient, meta=(AllowPrivateAccess=true)) TWeakObjectPtr CharacterSight; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) TWeakObjectPtr CurrentTarget; UPROPERTY(BlueprintReadWrite, EditAnywhere, Export, Transient, meta=(AllowPrivateAccess=true)) TWeakObjectPtr CurrentTargetAfflictions; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) TScriptInterface 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& 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& TargetHealth) const; UFUNCTION(BlueprintCallable, BlueprintPure) bool IsBossFight(const TScriptInterface& Health) const; UFUNCTION(BlueprintCallable, BlueprintPure) UHealthComponentBase* GetLookingAtHealth() const; UFUNCTION(BlueprintCallable, BlueprintPure) AActor* GetLookingAtActor() const; UFUNCTION(BlueprintCallable, BlueprintPure) bool GetCharacterTemperatureEffect(float& TemperatureEffect) const; };