LEAP Documentation 40220
Documentation for the LEAP project
KillCameraActor.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/Actor.h"
7#include "PoseSnapshot.h"
8#include "KillCameraActor.generated.h"
9
10class UCameraComponent;
11class UMeshComponent;
12class USpringArmComponent;
16
17UCLASS(Blueprintable)
18class PROJECTX_API AKillCameraActor : public AActor
19{
20 GENERATED_BODY()
21
22public:
23 // Sets default values for this actor's properties
25
26 UFUNCTION(BlueprintCallable)
27 void SetKillerPivotPoint(FVector NewPivotPoint) { ActorPivotPoint = NewPivotPoint; }
28 UFUNCTION(BlueprintCallable)
29 void SetWidgetPlacementPivot(FVector NewWidgetPlacementPivot) { WidgetPlacementPivot = NewWidgetPlacementPivot; }
30 UFUNCTION(BlueprintCallable)
31 void UpdateSpringArmLength(float Length);
32
33 UFUNCTION(BlueprintCallable)
34 UCameraComponent* GetCamera() const { return Camera; }
35 UFUNCTION(BlueprintCallable)
36 USpringArmComponent* GetSpringArm() const { return SpringArm; }
37
38 UFUNCTION(BlueprintImplementableEvent)
39 void InitializeKillCameraActor(AProjectXCharacter* Killed, AActor* Killer, AProjectXPlayerState* KillerState, TSubclassOf<UDamageType> DamageType) const;
40
41 UFUNCTION()
42 void KillerFocused();
43
44 UFUNCTION(BlueprintCallable)
45 const FPoseSnapshot& GetSnapShotPose() const { return PoseSnapShot; }
46
47 void SetKillerBounds(FBoxSphereBounds NewBounds) { KillerBounds = NewBounds; }
48 FBoxSphereBounds GetKillerBounds() const { return KillerBounds; }
49 FVector GetWidgetPlacementPivot() const { return WidgetPlacementPivot; }
50
51 FPoseSnapshot PoseSnapShot;
52
53protected:
54 // Called when the game starts or when spawned
55 virtual void BeginPlay() override;
56 void ForceSkeletalMeshUpdate(USkeletalMeshComponent* Mesh);
57
58 UFUNCTION(BlueprintImplementableEvent)
59 void OnKillerFocused();
60
61 FVector WidgetPlacementPivot = FVector::ZeroVector;
62
63 UPROPERTY()
64 TArray<UMeshComponent*> KillCamActorMeshes;
65 UPROPERTY(BlueprintReadOnly)
66 FBoxSphereBounds KillerBounds = FBoxSphereBounds();
67 UPROPERTY(BlueprintReadOnly)
68 FVector ActorPivotPoint = FVector::ZeroVector;
69
70 UPROPERTY(EditDefaultsOnly)
71 UCameraComponent* Camera;
72 UPROPERTY(EditDefaultsOnly)
73 USpringArmComponent* SpringArm;
74 UPROPERTY(EditDefaultsOnly)
75 USceneComponent* Root;
76};
Definition: KillCameraActor.h:19
void SetKillerBounds(FBoxSphereBounds NewBounds)
Definition: KillCameraActor.h:47
void ForceSkeletalMeshUpdate(USkeletalMeshComponent *Mesh)
FBoxSphereBounds GetKillerBounds() const
Definition: KillCameraActor.h:48
FVector GetWidgetPlacementPivot() const
Definition: KillCameraActor.h:49
FPoseSnapshot PoseSnapShot
Definition: KillCameraActor.h:51
Definition: ProjectXCharacter.h:128
virtual void BeginPlay() override
Definition: ProjectXCharacter.cpp:179
Definition: ProjectXPlayerState.h:238
Definition: ProjectXDamageType.h:62