24 virtual void Tick(
float DeltaSeconds)
override;
27 bool StartCircleWarning(
const FTransform& WorldTransform,
float StartRadius,
float FinalRadius,
const FPatternWarningDecalSettings& Settings, USceneComponent* AttachParent =
nullptr);
30 bool StartLineWarning(
const FTransform& WorldTransform,
float Length,
float Width,
const FPatternWarningDecalSettings& Settings, USceneComponent* AttachParent =
nullptr);
33 bool StartRingWarning(
const FTransform& WorldTransform,
float InnerRadius,
float OuterRadius,
const FPatternWarningDecalSettings& Settings, USceneComponent* AttachParent =
nullptr);
35 void LockCircleWarningAtTransform(
const FTransform& WorldTransform);
38 bool BeginWarningProgress(
float Duration);
39 void SetLineLengthRatio(
float LengthRatio);
42 void ReturnToPoolImmediately();
45 virtual void OnSpawnFromPool_Implementation()
override;
46 virtual void OnReturnToPool_Implementation()
override;
50 bool SetWarningTransform(
const FTransform& WorldTransform,
const FRotator& ProjectionRotation, USceneComponent* AttachParent);
56 bool ConfigureDecalComponent(UDecalComponent* DecalComponent, UMaterialInterface* DecalMaterial,
const FVector& DecalSize, int32 SortOrder,
float FadeInDuration)
const;
58 void BeginStopWarning(
bool bCompleteProgress);
59 void ApplyFadeOut(UDecalComponent* DecalComponent,
float FadeOutDuration)
const;
62 void UpdateWarningProgress();
63 void SetWarningProgress(
float Progress);
65 void ResetRuntimeState();
66 void ResetDecalComponent(UDecalComponent* DecalComponent)
const;
69 UPROPERTY(VisibleAnywhere, Category =
"Warning")
70 TObjectPtr<USceneComponent> SceneRootComponent;
72 UPROPERTY(VisibleAnywhere, Category = "Warning")
73 TObjectPtr<UDecalComponent> MaxRangeDecalComponent;
75 UPROPERTY(VisibleAnywhere, Category = "Warning")
76 TObjectPtr<UDecalComponent> FillDecalComponent;
79 float WarningStartTime = 0.0f;
80 float CurrentWarningDuration = 0.0f;
81 float CurrentFadeOutDuration = 0.0f;
82 float CurrentLineLength = 0.0f;
83 float CurrentLineLengthRatio = 1.0f;
84 float CurrentProgress = 0.0f;
85 float CurrentCircleStartRadius = 0.0f;
86 float CurrentCircleFinalRadius = 0.0f;
87 bool bIsFadingOut = false;
89 FTimerHandle ReturnToPoolTimerHandle;
92 TObjectPtr<UMaterialInstanceDynamic> RingFillMaterial;