LEAP Documentation 40220
Documentation for the LEAP project
DesignatorMarker.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 "OwnedInterface.h"
8#include "TeamInterface.h"
9#include "DesignatorMarker.generated.h"
10
11UCLASS(Blueprintable)
12class PROJECTX_API ADesignatorMarker : public AActor, public IOwnedInterface, public ITeamInterface
13{
14 GENERATED_UCLASS_BODY()
15public:
16 UFUNCTION(BlueprintCallable, Category = Marker)
17 float GetDesignatorRadius() const { return DesignatorRadius; }
18 void SetTargetTransform(const FTransform NewTargetTransform) { TargetTransform = NewTargetTransform; }
19 virtual bool ApplyDepenetrationAdjustment();
20
21 UFUNCTION()
22 virtual void StartCharge(float TotalTime, float ElapsedTime);
23 UFUNCTION()
24 virtual void EndCharge(float TotalTime, float ElapsedTime);
25 UFUNCTION()
26 virtual void ToggleValidDesignator(bool bValid);
27
28 UFUNCTION(BlueprintNativeEvent)
29 void Complete();
30
31 APlayerState* GetOwnedPlayerState() const override { return PlayerOwner; }
32 int32 GetTeam() const override;
33 virtual void OnOwnerLeave() override;
34
35 UFUNCTION(BlueprintPure)
36 bool IsLocallyOwned() const;
37
38protected:
39 virtual void BeginPlay() override;
40 virtual void Tick(float DeltaTime) override;
41 UFUNCTION(BlueprintImplementableEvent, Category = Marker)
42 void K2_StartCharge(float TotalTime, float ElapsedTime);
43
44 UFUNCTION(BlueprintImplementableEvent, Category = Marker)
45 void K2_EndCharge(float TotalTime, float ElapsedTime);
46 UFUNCTION(BlueprintImplementableEvent, Category = Marker)
47 void K2_UpdateValidDesignator(bool bValidDesignator);
48
49 UFUNCTION(BlueprintImplementableEvent, Category = Deployable)
50 void InitializeForTeam(int32 Team);
51
52 UPROPERTY()
53 APlayerState* PlayerOwner = NULL;
54
55 UPROPERTY(BlueprintReadWrite,VisibleAnywhere, Category = "Designator Marker")
56 class USphereComponent* SceneComponent;
57
58 UPROPERTY()
59 class UShapeComponent* ShapeComponent = NULL;
60
61 UPROPERTY(EditDefaultsOnly, Category = "Designator Marker")
62 float DesignatorRadius = 100.f;
63 UPROPERTY(EditDefaultsOnly, Category = "Designator Marker")
64 float DesignatorLocationLerpSpeed = 5.f;
65
66 FTransform TargetTransform = FTransform::Identity;
67};
Definition: DesignatorMarker.h:13
void SetTargetTransform(const FTransform NewTargetTransform)
Definition: DesignatorMarker.h:18
Definition: OwnedInterface.h:20
Definition: TeamInterface.h:26