34 return EventListenerComponent;
39 UFUNCTION(BlueprintCallable, Category =
"CheckPoint")
40 void SaveCheckPoint(AActor* PlayerActor);
42 UFUNCTION(BlueprintCallable, Category = "CheckPoint")
43 void SendRespawnEvent(AActor* PlayerActor);
46 UFUNCTION(BlueprintPure, Category = "CheckPoint")
47 FORCEINLINE FTransform GetSpawnTransform()
const
49 return SpawnPointComponent ? SpawnPointComponent->GetComponentTransform() : GetActorTransform();
53 UPROPERTY(BlueprintAssignable, Category =
"CheckPoint")
54 FOnCheckPointSavedDelegate OnCheckPointSaved;
57 virtual
void BeginPlay() override;
58 virtual
void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
62 void HandleBoxBeginOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
bool bFromSweep, const FHitResult& SweepResult);
65 void ActivateOnBeginPlay();
69 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "CheckPoint")
70 bool bActivateOnBeginPlay = false;
73 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "CheckPoint")
74 bool bDetectOnce = true;
76 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "CheckPoint")
77 TObjectPtr<UBoxComponent> BoxComponent;
79 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "CheckPoint")
83 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "CheckPoint")
87 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "CheckPoint")
90 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "CheckPoint")
91 TObjectPtr<USceneComponent> SpawnPointComponent;
93#if WITH_EDITORONLY_DATA
94 UPROPERTY(VisibleAnywhere)
95 TObjectPtr<UBillboardComponent> SpriteComponent;
99 bool bVisited =
false;
DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FOnCheckPointSavedDelegate, AActor *, ContactActor, float, SavedTimeSeconds, FVector, SavedLocation, ACheckPoint *, CheckPoint)