LEAP Documentation 40220
Documentation for the LEAP project
TrackableInterface.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 "ProjectX.h"
6#include "UObject/Interface.h"
7#include "TrackableInterface.generated.h"
8
9class UMapMarkerComponent;
10
11DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FStopTrackingActorSignature,const AActor*, Actor);
12
13UINTERFACE(BlueprintType, meta = (CannotImplementInterfaceInBlueprint))
14class PROJECTX_API UTrackableInterface : public UInterface
15{
16 GENERATED_UINTERFACE_BODY()
17};
18
21class PROJECTX_API ITrackableInterface
22{
23 GENERATED_IINTERFACE_BODY()
24public:
25 virtual void BroadcastTrackableActor();
26 virtual FStopTrackingActorSignature& GetStopTrackingEvent() { return StopTrackingEvent; }
27
28 //Returns the Owner's Icon to be displayed on the map (Deploy screen).
29 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
30 virtual TSoftObjectPtr<UTexture2D> GetMapIcon() const { return NULL; }
31 //Returns the Owner's Icon to be displayed on the map (Deploy screen).
32 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
33 virtual TSoftObjectPtr<UTexture2D> GetRadarIcon() const { return NULL; }
34 //Returns the Owner's Icon to be displayed on the HUD
35 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
36 virtual TSoftObjectPtr<UTexture2D> GetHudIcon() const { return NULL; }
37 //Returns the actor that implements this interface
38 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
39 virtual AActor* GetTrackableInterfaceActor() {return NULL;}
40 //Returns the Owner's desired radar icon size 16.0f means default (unchanged)
41 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
42 virtual float GetRadarIconSize() const { return 2000.0f; }
43 //Returns the Owner's desired radar icon opacity, 1.0f means default (unchanged)
44 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
45 virtual float GetRadarIconOpacity() const { return 1.0f; }
46 //Returns the Owner's desired radar icon opacity when as enemy, returns GetRadarIconOpacity as default (unchanged)
47 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
48 virtual float GetRadarIconEnemyOpacity() const { return GetRadarIconOpacity(); }
49 //Returns if this actor's icon should compensate for the player rotation
50 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
51 virtual bool GetRadarIconCompensantesRotation() const { return false; }
52 UFUNCTION(BlueprintCallable)
53 virtual bool GetAllyVisibilityResponse() { return GetTrackableInterfaceActor() ? GetTrackableInterfaceActor()->CanBeDamaged() : false;}
54 //Allows for custom radar text labels
55 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
56 virtual const FText& GetRadarLabel() const { return FText::GetEmpty(); }
57 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
58 virtual void SetRadarIconOpacity(float Opacity) {}
59 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
60 virtual bool IsCloaked() const { return false; }
61 UFUNCTION(BlueprintCallable, Category = TrackableInterface)
62 virtual bool RegisterOnStart() const { return true; }
63
64private:
65 FStopTrackingActorSignature StopTrackingEvent;
66};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FStopTrackingActorSignature, const AActor *, Actor)
Definition: TrackableInterface.h:22
virtual FStopTrackingActorSignature & GetStopTrackingEvent()
Definition: TrackableInterface.h:26
Definition: TrackableInterface.h:15