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

#include <InteractableCharacter.h>

Inheritance diagram for AInteractableCharacter:
ACharacterBase ICharacterBaseInterface ISaveLoad IBaseInterface AALSBaseCharacter AALSCharacter ACustomCharacterBase ACustomAICharacter ACustomPlayerCharacter ACampaignAICharacter AHordeAICharacter ACampaignPlayerCharacter AMultiplayerPlayerCharacter

Public Member Functions

 AInteractableCharacter (const FObjectInitializer &ObjectInitializer)
 
virtual USceneComponent * GetThrowPoint () const override
 
virtual void ReceiveStartFocus (AActor *Caller)
 
virtual void ReceiveEndFocus (AActor *Caller)
 
virtual void ReceiveOnInteract (AActor *Caller, const EInteractionType InteractionType)
 
virtual void ReceiveOnEndInteract (AActor *Caller)
 
virtual void ReceiveOnOverlap (AActor *Caller)
 
virtual void ReceiveOnEndOverlap (AActor *Caller)
 
virtual void ReceiveToggleSwitch (AActor *Caller, const bool bOn)
 
- Public Member Functions inherited from ACharacterBase
 ACharacterBase (const FObjectInitializer &ObjectInitializer)
 
virtual void Tick (float DeltaTime) override
 
virtual void SetupPlayerInputComponent (class UInputComponent *PlayerInputComponent) override
 
virtual bool SaveGame () override
 
virtual bool LoadGame () override
 
virtual USkeletalMeshComponent * GetCharacterMesh () const override
 
virtual UPrimitiveComponent * GetPrimitiveComponent () override
 
virtual void Ragdoll () override
 
virtual void RagdollStop () override
 
virtual float PlayReplicatedMontage (UAnimMontage *MontageToPlay, const float InPlayRate=1.0f, const EMontagePlayReturnType ReturnValueType=EMontagePlayReturnType::Duration, const float InTimeToStartMontageAt=0.0f, const bool bStopAllMontages=true) override
 
virtual void StopReplicatedMontage (const float InBlendOutTime, const UAnimMontage *Montage) override
 
virtual bool GetCharacterHealth (float &Health, float &MaxHealth) const override
 
virtual FCharacterBaseSkillsGetCharacterSkills () override
 
virtual bool GetAudioSocketLocation (const FName &AudioSocket, FVector &Location) const override
 
virtual FCharacterInfo GetCharacterInfo () const override
 
virtual void GetThrowStats (FTransform &OutTransform, FVector &OutThrowForce) const override
 
virtual void CharacterModeChanged (const FGameplayTag &NewMode) override
 
virtual int32 GetStrength () const
 
virtual int32 GetPerception () const
 
virtual int32 GetEndurance () const
 
virtual int32 GetCharisma () const
 
virtual int32 GetIntelligence () const
 
virtual int32 GetAgility () const
 
virtual int32 GetWeaponSkill () const
 
virtual int32 GetStealth () const
 
virtual int32 GetLuck () const
 
virtual int32 GetSkillPoints () const
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual void OnPawnSpawned () override
 
virtual void InteractionDataUpdated ()
 
- Protected Member Functions inherited from ACharacterBase
virtual void NotifyHit (UPrimitiveComponent *MyComp, AActor *Other, UPrimitiveComponent *OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult &Hit) override
 
virtual void FallOver (const float WaitTime)
 
void OnFallOver (const float WaitTime)
 
virtual void GetUpFromFall ()
 
void OnGetUpFromFall ()
 
void OnRep_CharacterDeath ()
 
IPlayerControllerInterfaceGetPlayerControllerInterface ()
 
IPlayerStateInterfaceGetPlayerStateInterface ()
 
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

USceneComponent * ThrowPoint
 
class UInteractionComponent * InteractionComponent
 
class UInteractableActorComponent * InteractableActorComponent
 
class USphereComponent * InteractionSphere
 
class UInventoryComponent * InventoryComponent
 
class UAudioReactionComponent * AudioReactionComponent
 
bool bAlwaysShowOutline = false
 
- Protected Attributes inherited from ACharacterBase
bool bDebuggingMode = false
 
FCharacterBaseSkills CharacterSkills
 
FCharacterInfo CharacterInfo
 
bool bDead = false
 
float PickupThrowIntensity = 500.0f
 
bool bCanBePushed = false
 
float HitVelocityThreshold = 50.0f
 
float HitVelocityMultiplier = 5.0f
 
float HitReactionMultiplier = 0.01f
 
bool bPushHitReaction = true
 
bool bAddMovementInput = true
 
bool bAddCharacterMovement = true
 
float PushFallVelocityThreshold = 200.0f
 
float PushedFallVelocityThreshold = 500.0f
 
float PushedFallOverWaitTime = 2.0f
 

Additional Inherited Members

- Public Attributes inherited from ACharacterBase
FOnCharacterDeath OnCharacterDeath
 

Detailed Description

Add all functions that can be used for Players and AI

Constructor & Destructor Documentation

◆ AInteractableCharacter()

AInteractableCharacter::AInteractableCharacter ( const FObjectInitializer & ObjectInitializer)
explicit

Add all functions that can be used for Players and AI

14 :Super(ObjectInitializer)
15{
16 PrimaryActorTick.bCanEverTick = false;
17 InteractionComponent = CreateDefaultSubobject<UInteractionComponent>(TEXT("Interaction Component"));
18 InteractableActorComponent = CreateDefaultSubobject<UInteractableActorComponent>(TEXT("Interactable Actor Component"));
19 InteractableActorComponent->OnInteractDelegate.AddUniqueDynamic(this, &AInteractableCharacter::ReceiveOnInteract);
20 InteractableActorComponent->OnEndInteractDelegate.AddUniqueDynamic(this, &AInteractableCharacter::ReceiveOnEndInteract);
21 InteractableActorComponent->OnStartFocusDelegate.AddUniqueDynamic(this, &AInteractableCharacter::ReceiveStartFocus);
22 InteractableActorComponent->OnEndFocusDelegate.AddUniqueDynamic(this, &AInteractableCharacter::ReceiveEndFocus);
23 InteractableActorComponent->OnToggleSwitchDelegate.AddUniqueDynamic(this, &AInteractableCharacter::ReceiveToggleSwitch);
24 InteractableActorComponent->OnOverlapDelegate.AddUniqueDynamic(this, &AInteractableCharacter::ReceiveOnOverlap);
25 InteractableActorComponent->OnEndOverlapDelegate.AddUniqueDynamic(this, &AInteractableCharacter::ReceiveOnEndOverlap);
26 InteractableActorComponent->OnInteractionDataUpdated.AddUniqueDynamic(this, &AInteractableCharacter::InteractionDataUpdated);
27 InteractableActorComponent->bPickupOnOverlap = false;
29 InteractableActorComponent->AimAssistInfluence = 1.0f;
30 InteractableActorComponent->bAlwaysShowOutline = true;
31 InteractableActorComponent->bOutlineMeshOnFocus = true;
32
33 InventoryComponent = CreateDefaultSubobject<UInventoryComponent>(TEXT("Inventory Component"));
34
35 AudioReactionComponent = CreateDefaultSubobject<UAudioReactionComponent>(TEXT("AudioReaction Component"));
36
37 InteractionSphere = CreateDefaultSubobject<USphereComponent>(TEXT("Sphere Component"));
38 InteractionSphere->SetupAttachment(RootComponent);
39 InteractionSphere->InitSphereRadius(250.0f);
40 // InteractionSphere->
41 if(AudioReactionComponent != nullptr)
42 {
43 AudioReactionComponent->bAutoActivate = true;
44 }
45 //- Throw Point //
46 ThrowPoint = CreateDefaultSubobject<USceneComponent>(TEXT("ThrowPoint"));
47 ThrowPoint->SetupAttachment(GetMesh(), ("head"));
48 ThrowPoint->SetWorldTransform(FTransform(FRotator(90.0f,-90.0f,0.0f), FVector(0.0f,-30.0f,80.0f)));
49
50}
class UAudioReactionComponent * AudioReactionComponent
Definition InteractableCharacter.h:65
virtual void ReceiveOnInteract(AActor *Caller, const EInteractionType InteractionType)
Definition InteractableCharacter.cpp:66
class UInventoryComponent * InventoryComponent
Definition InteractableCharacter.h:63
virtual void ReceiveEndFocus(AActor *Caller)
Definition InteractableCharacter.cpp:62
virtual void ReceiveOnOverlap(AActor *Caller)
Definition InteractableCharacter.cpp:76
class USphereComponent * InteractionSphere
Definition InteractableCharacter.h:60
class UInteractableActorComponent * InteractableActorComponent
Definition InteractableCharacter.h:58
virtual void ReceiveStartFocus(AActor *Caller)
Definition InteractableCharacter.cpp:57
virtual void ReceiveOnEndOverlap(AActor *Caller)
Definition InteractableCharacter.cpp:80
class UInteractionComponent * InteractionComponent
Definition InteractableCharacter.h:56
USceneComponent * ThrowPoint
Definition InteractableCharacter.h:54
virtual void ReceiveOnEndInteract(AActor *Caller)
Definition InteractableCharacter.cpp:71
virtual void ReceiveToggleSwitch(AActor *Caller, const bool bOn)
Definition InteractableCharacter.cpp:84
virtual void InteractionDataUpdated()
Definition InteractableCharacter.cpp:103
Definition BaseData.h:420

Member Function Documentation

◆ BeginPlay()

void AInteractableCharacter::BeginPlay ( )
overrideprotectedvirtual

◆ GetThrowPoint()

USceneComponent * AInteractableCharacter::GetThrowPoint ( ) const
overridevirtual

Reimplemented from ACharacterBase.

53{
54 return ThrowPoint;
55}

◆ InteractionDataUpdated()

void AInteractableCharacter::InteractionDataUpdated ( )
protectedvirtual
104{
105 if(InteractionComponent != nullptr)
106 {
107 InteractionComponent->UpdateInteractionData();
108 }
109}

◆ OnPawnSpawned()

void AInteractableCharacter::OnPawnSpawned ( )
overrideprotectedvirtual

Reimplemented from ACharacterBase.

Reimplemented in ACampaignPlayerCharacter, ACustomCharacterBase, and ACustomPlayerCharacter.

95{
96 Super::OnPawnSpawned();
97 if(AudioReactionComponent != nullptr)
98 {
99 AudioReactionComponent->SetSkeletalMeshComponent(GetMesh());
100 }
101}

◆ ReceiveEndFocus()

void AInteractableCharacter::ReceiveEndFocus ( AActor * Caller)
virtual
63{
64}

◆ ReceiveOnEndInteract()

void AInteractableCharacter::ReceiveOnEndInteract ( AActor * Caller)
virtual
72{
73
74}

◆ ReceiveOnEndOverlap()

void AInteractableCharacter::ReceiveOnEndOverlap ( AActor * Caller)
virtual
81{
82}

◆ ReceiveOnInteract()

void AInteractableCharacter::ReceiveOnInteract ( AActor * Caller,
const EInteractionType InteractionType )
virtual
67{
68
69}

◆ ReceiveOnOverlap()

void AInteractableCharacter::ReceiveOnOverlap ( AActor * Caller)
virtual
77{
78}

◆ ReceiveStartFocus()

void AInteractableCharacter::ReceiveStartFocus ( AActor * Caller)
virtual
58{
59
60}

◆ ReceiveToggleSwitch()

void AInteractableCharacter::ReceiveToggleSwitch ( AActor * Caller,
const bool bOn )
virtual
85{
86}

Member Data Documentation

◆ AudioReactionComponent

class UAudioReactionComponent* AInteractableCharacter::AudioReactionComponent
protected

◆ bAlwaysShowOutline

bool AInteractableCharacter::bAlwaysShowOutline = false
protected

◆ InteractableActorComponent

class UInteractableActorComponent* AInteractableCharacter::InteractableActorComponent
protected

◆ InteractionComponent

class UInteractionComponent* AInteractableCharacter::InteractionComponent
protected

◆ InteractionSphere

class USphereComponent* AInteractableCharacter::InteractionSphere
protected

◆ InventoryComponent

class UInventoryComponent* AInteractableCharacter::InventoryComponent
protected

◆ ThrowPoint

USceneComponent* AInteractableCharacter::ThrowPoint
protected

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