Space Plunder
Loading...
Searching...
No Matches
AInteractionPingActor Class Reference

#include <InteractionPingActor.h>

Inheritance diagram for AInteractionPingActor:
AInteractableActor IInteractionPing AActorBase IBaseInterface ISaveLoad

Public Member Functions

 AInteractionPingActor ()
 
virtual void SetPingData (const FPingData &Ping, AActor *Sender) override
 
- Public Member Functions inherited from AInteractableActor
 AInteractableActor ()
 
virtual void ReceiveStartFocus (AActor *Caller)
 
virtual void ReceiveEndFocus (AActor *Caller)
 
virtual void ReceiveOnEndInteract (AActor *Caller)
 
virtual void ReceiveOnEndOverlap (AActor *Caller)
 
virtual void ReceiveToggleSwitch (AActor *Caller, const bool bOn)
 
- Public Member Functions inherited from AActorBase
 AActorBase ()
 
virtual bool SaveGame () override
 
virtual bool LoadGame () override
 
void SetGravityEnabledEvent (const bool bValue)
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual void ReceiveOnInteract (AActor *Caller, const EInteractionType InteractionType) override
 
virtual void ReceiveOnOverlap (AActor *Caller) override
 
- Protected Member Functions inherited from AInteractableActor
virtual void Tick (float DeltaTime) override
 
virtual void SetMeshOutline (const bool bValue)
 
- Protected Member Functions inherited from AActorBase
void LogDebugError (const FString &Message) const
 
void LogDebugError (const FString &Message, const int32 Value) const
 
void LogDebugError (const FString &Message, const float Value) const
 
void LogDebugWarning (const FString &Message) const
 
void LogDebugWarning (const FString &Message, const int32 Value) const
 
void LogDebugWarning (const FString &Message, const float Value) const
 
void LogDebugMessage (const FString &Message, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const int32 Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const float Value, const bool bWarning=false, const bool bError=false) const
 
void LogDebugMessage (const FString &Message, const bool bValue, const bool bWarning, const bool bError) const
 
void LogOnScreenMessage (const int32 Key, const FString &Message, FColor Color=FColor::Green) const
 
void SetCategoryName (const FLogCategoryBase &Category)
 

Protected Attributes

class USceneComponent * SceneComponent
 
class UCapsuleComponent * CapsuleComponent
 
class UScreenFacingWidgetComponent * ScreenFacingWidgetComponent
 
UInteractionPingWidgetInteractionPingWidget
 
AActor * SenderActor = nullptr
 
- Protected Attributes inherited from AInteractableActor
class UInteractableActorComponent * InteractableActorComponent
 
class UAudioReactionComponent * AudioReactionComponent
 
class UAIPerceptionStimuliSourceComponent * PerceptionStimuliComponent
 
- Protected Attributes inherited from AActorBase
FString DisplayName = "Display Name"
 
bool bDebuggingMode = false
 

Private Attributes

TSubclassOf< UUserWidget > PingWidgetClass
 

Constructor & Destructor Documentation

◆ AInteractionPingActor()

AInteractionPingActor::AInteractionPingActor ( )
11{
12 PrimaryActorTick.bCanEverTick = false;
13 const ConstructorHelpers::FClassFinder<UUserWidget> InteractionPingBP(TEXT("/Interaction/Widgets/WBP_InteractionPing"));
14 if (!ensure(InteractionPingBP.Class != nullptr)) return;
15 PingWidgetClass = InteractionPingBP.Class;
16
17 SceneComponent = CreateDefaultSubobject<USceneComponent>(TEXT("Scene Component"));
18 RootComponent = SceneComponent;
19
20 ScreenFacingWidgetComponent = CreateDefaultSubobject<UScreenFacingWidgetComponent>(TEXT("Screen Facing Widget"));
23
24 CapsuleComponent = CreateDefaultSubobject<UCapsuleComponent>(TEXT("Capsule"));
25 CapsuleComponent->SetupAttachment(SceneComponent);
26
27 bReplicates = true;
28}
TSubclassOf< UUserWidget > PingWidgetClass
Definition InteractionPingActor.h:52
class USceneComponent * SceneComponent
Definition InteractionPingActor.h:36
class UCapsuleComponent * CapsuleComponent
Definition InteractionPingActor.h:38
class UScreenFacingWidgetComponent * ScreenFacingWidgetComponent
Definition InteractionPingActor.h:40

Member Function Documentation

◆ BeginPlay()

void AInteractionPingActor::BeginPlay ( )
overrideprotectedvirtual

Reimplemented from AInteractableActor.

50{
51 Super::BeginPlay();
52 InteractionPingWidget = Cast<UInteractionPingWidget>(ScreenFacingWidgetComponent->GetUserWidgetObject());
53 if(InteractionPingWidget == nullptr)
54 {
55 UE_LOG(LogTemp, Warning, TEXT("Interaction Widget NULL in Interaction Ping Actor"));
56 ScreenFacingWidgetComponent->Deactivate();
57 ScreenFacingWidgetComponent->DestroyComponent();
58 Destroy();
59 }
60 else
61 {
63 }
64}
UInteractionPingWidget * InteractionPingWidget
Definition InteractionPingActor.h:44
void ActorConstruct()
Definition InteractionPingWidget.cpp:25

◆ ReceiveOnInteract()

void AInteractionPingActor::ReceiveOnInteract ( AActor * Caller,
const EInteractionType InteractionType )
overrideprotectedvirtual

Reimplemented from AInteractableActor.

67{
68 Super::ReceiveOnInteract(Caller, InteractionType);
69 if(InteractionType == EInteractionType::Delete)
70 {
71 Destroy();
72 }
73 // if(SelectedInteraction == 1)
74 // {
75 // Destroy();
76 // }
77}

◆ ReceiveOnOverlap()

void AInteractionPingActor::ReceiveOnOverlap ( AActor * Caller)
overrideprotectedvirtual

Reimplemented from AInteractableActor.

80{
81 Super::ReceiveOnOverlap(Caller);
82 if(SenderActor == Caller)
83 {
84 Destroy();
85 }
86}
AActor * SenderActor
Definition InteractionPingActor.h:48

◆ SetPingData()

void AInteractionPingActor::SetPingData ( const FPingData & Ping,
AActor * Sender )
overridevirtual

Implements IInteractionPing.

41{
42 if(InteractionPingWidget != nullptr)
43 {
46 }
47}
void SetPingActor(AActor *Actor)
Definition InteractionPingWidget.h:36
void SetPingData(const FPingData &Ping, AActor *Sender)
Definition InteractionPingWidget.cpp:43

Member Data Documentation

◆ CapsuleComponent

class UCapsuleComponent* AInteractionPingActor::CapsuleComponent
protected

◆ InteractionPingWidget

UInteractionPingWidget* AInteractionPingActor::InteractionPingWidget
protected

◆ PingWidgetClass

TSubclassOf<UUserWidget> AInteractionPingActor::PingWidgetClass
private

◆ SceneComponent

class USceneComponent* AInteractionPingActor::SceneComponent
protected

◆ ScreenFacingWidgetComponent

class UScreenFacingWidgetComponent* AInteractionPingActor::ScreenFacingWidgetComponent
protected

◆ SenderActor

AActor* AInteractionPingActor::SenderActor = nullptr
protected

The documentation for this class was generated from the following files: