5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
8#include "KillCameraComponent.generated.h"
13class UWidgetComponent;
16class IKillCameraInterface;
21UCLASS( ClassGroup=(
Custom), BlueprintType, Blueprintable, meta=(BlueprintSpawnableComponent) )
24 GENERATED_UCLASS_BODY()
27 UFUNCTION(BlueprintCallable, Category = "
Kill Camera")
29 UFUNCTION(BlueprintCallable, Category = "
Kill Camera")
30 void EndKillCamera(
bool bFireEndEvent = false);
31 UFUNCTION(BlueprintCallable, Category = "
Kill Camera")
32 AKillCameraActor* GetKillCameraActor()
const {
return KillCameraActor.IsValid() ? KillCameraActor.Get() : NULL; }
35 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
36 virtual void TickComponent(
float DeltaTime,
enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction)
override;
39 UPROPERTY(BlueprintAssignable, Category =
"Kill Camera|Events")
40 FKillCamEndSignature OnKillCamEnd;
42 UPROPERTY(BlueprintAssignable,BlueprintCallable)
43 FKillCamFocusSignature OnKillCamFocusVictim;
44 UPROPERTY(BlueprintAssignable, BlueprintCallable)
45 FKillCamFocusSignature OnKillCamFocusKiller;
48 UFUNCTION(BlueprintImplementableEvent, Category = "
Kill Camera", meta = (DisplayName = "Initialize
Kill Camera"))
50 UFUNCTION(BlueprintImplementableEvent, Category = "
Kill Camera", meta = (DisplayName = "
On Spectator Pawn Available"))
51 void OnSpectatorPawnAvailable(ASpectatorPawn* SpectatorPawn) const;
52 UFUNCTION(BlueprintImplementableEvent, Category = "
Kill Camera", meta = (DisplayName = "
On Killer Camera Component Registered"))
53 void OnKillCamComponentRegistered(UActorComponent* ObjectRegistered) const;
54 UFUNCTION(BlueprintCallable, Category = "
Kill Camera")
55 bool CanLookAtKiller() const;
57 void CheckAndWaitForSpectatorPawn();
58 void SpectatorPawnAvailable(ASpectatorPawn* SpectatorPawn);
59 void RegisterKillCamComponent(UActorComponent* Component);
60 void CleanUpComponents();
62 UPROPERTY(EditDefaultsOnly, Category = "
Kill Camera")
63 TSubclassOf<UWidgetComponent> KillCamWidgetComponentClass = NULL;
64 UPROPERTY(EditDefaultsOnly, Category = "
Kill Camera")
65 float BlendToBeaconTime = 1.0f;
66 UPROPERTY(EditDefaultsOnly, Category = "
Kill Camera")
67 float WaitTimeBeforeBlendingToSpawnBecon = 2.0f;
69 FTimerHandle WaitToBlendTimerHandle;
71 TArray<TWeakObjectPtr<UActorComponent>> KillCamComponents;
72 TWeakObjectPtr<AActor> KilledActor = NULL;
73 TWeakObjectPtr<AActor> KillerActor = NULL;
74 TWeakObjectPtr<ASpectatorPawn> KillCamSpectatorPawn = NULL;
76 TArray<TWeakObjectPtr<AActor>> NearbyKillCamInterfaces;
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FKillCamFocusSignature)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FKillCamEndSignature, float, BlendTime)
Definition: KillCameraActor.h:19
Definition: ProjectXCharacter.h:128
Definition: ProjectXPlayerController.h:83
Definition: ProjectXPlayerState.h:238
Definition: ReactsToMatchEvents.h:16
virtual void MatchEnded()
Definition: ReactsToMatchEvents.cpp:16