22 virtual void SetAbilitySystemComponent(AActor* InOwner)
override;
25 virtual void NativeDestruct()
override;
26 virtual void UpdateHpBar()
override;
29 void StartDelayedHpBarDecrease(
float InTargetPercent);
30 void SetDelayedHpBarPercent(
float InPercent);
31 float GetHealthPercent()
const;
32 void RefreshDelayedHpBar();
33 void StopDelayedHpBarDecrease();
34 void UpdateDelayedHpBarDecrease();
35 void UpdateHpText()
const;
38 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category =
"UI|HpBar")
39 FText HpTextFormat = FText::FromString("{CHP} / {MHP}
");
41 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI|HpBar
")
42 float DelayedDecreaseDuration = 0.5f;
44 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI|HpBar
")
45 float DelayedUpdateInterval = 0.016f;
47 UPROPERTY(meta = (BindWidget))
48 TObjectPtr<UProgressBar> DelayedHealthProgressBar;
50 UPROPERTY(meta = (BindWidgetOptional))
51 TObjectPtr<UTextBlock> HpText;
54 float DelayedHealthPercent = 1.0f;
55 float DelayedDecreaseStartPercent = 1.0f;
56 float DelayedDecreaseTargetPercent = 1.0f;
57 float DelayedDecreaseElapsedTime = 0.0f;
60 FTimerHandle DelayedDecreaseTimerHandle;