LEAP Documentation 40220
Documentation for the LEAP project
UTurretComponent Class Reference

#include <TurretComponent.h>

Inheritance diagram for UTurretComponent:
IOwnedInterface

Public Member Functions

FRotator GetTargetingRotation () const
 
AActor * GetTarget () const
 
virtual void Deactivate () override
 
virtual void Activate (bool bReset=false) override
 
virtual void FireProjectile (const FTransform &TransformStart, bool bRequiresValidTarget=true)
 
- Public Member Functions inherited from IOwnedInterface
template<class T >
T * GetOwnedPlayerState () const
 
virtual APlayerState * GetOwnedPlayerState () const
 
template<class T >
T * GetOwningController () const
 
virtual AController * GetOwningController () const
 
virtual void OnOwnerLeave ()
 
virtual void OnOwnerDied ()
 

Public Attributes

FVector ProjectileOffset = FVector::ZeroVector
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 
virtual void Fire ()
 
virtual void Targeting ()
 
virtual void SetTarget (AActor *NewTarget)
 
FTransform GetProjectileTransform () const
 
void Multicast_OnFired ()
 

Protected Attributes

FTargetFoundSignature OnTargetAcquired
 
FTargetFoundSignature OnTargetKilled
 
FFiredSignature OnFired
 
TWeakObjectPtr< AActor > Target = NULL
 
TWeakObjectPtr< AActor > PreviousTarget = NULL
 
TArray< AActor * > PotentialTargets
 
FTimerHandle FireDelayTimer
 
FTimerHandle TargetingDelayTimer
 
FTimerHandle FireRateTimer
 
TSubclassOf< class UWeaponInstanceProjectileWeaponInstanceClass = NULL
 
TSubclassOf< class UTurretOverlayWidgetTurretWidgetClass = NULL
 
float TargetAcquiredFireDelay = 1.0f
 
float Range = 15000.0f
 
float TargetingAngle = 45.0f
 
TArray< TEnumAsByte< EObjectTypeQuery > > ObjectTypes
 
FVector2D RandomTargetingRotationPitch = FVector2D(-45.0f, 45.0f)
 
FVector2D RandomTargetingRotationYaw = FVector2D(0.0f, 360.0f)
 
float RandomTargetingRotationDelay = 3.0f
 

Member Function Documentation

◆ Activate()

void UTurretComponent::Activate ( bool  bReset = false)
overridevirtual

◆ BeginPlay()

void UTurretComponent::BeginPlay ( )
overrideprotectedvirtual

◆ Deactivate()

void UTurretComponent::Deactivate ( )
overridevirtual

◆ EndPlay()

void UTurretComponent::EndPlay ( const EEndPlayReason::Type  EndPlayReason)
overrideprotectedvirtual

◆ Fire()

void UTurretComponent::Fire ( )
protectedvirtual

◆ FireProjectile()

void UTurretComponent::FireProjectile ( const FTransform &  TransformStart,
bool  bRequiresValidTarget = true 
)
virtual

◆ GetProjectileTransform()

FTransform UTurretComponent::GetProjectileTransform ( ) const
protected

◆ GetTarget()

AActor * UTurretComponent::GetTarget ( ) const
inline

◆ GetTargetingRotation()

FRotator UTurretComponent::GetTargetingRotation ( ) const

◆ Multicast_OnFired()

void UTurretComponent::Multicast_OnFired ( )
protected

◆ SetTarget()

void UTurretComponent::SetTarget ( AActor *  NewTarget)
protectedvirtual

◆ Targeting()

void UTurretComponent::Targeting ( )
protectedvirtual

Member Data Documentation

◆ FireDelayTimer

FTimerHandle UTurretComponent::FireDelayTimer
protected

◆ FireRateTimer

FTimerHandle UTurretComponent::FireRateTimer
protected

◆ ObjectTypes

TArray<TEnumAsByte<EObjectTypeQuery> > UTurretComponent::ObjectTypes
protected

◆ OnFired

FFiredSignature UTurretComponent::OnFired
protected

◆ OnTargetAcquired

FTargetFoundSignature UTurretComponent::OnTargetAcquired
protected

◆ OnTargetKilled

FTargetFoundSignature UTurretComponent::OnTargetKilled
protected

◆ PotentialTargets

TArray<AActor*> UTurretComponent::PotentialTargets
protected

◆ PreviousTarget

TWeakObjectPtr<AActor> UTurretComponent::PreviousTarget = NULL
protected

◆ ProjectileOffset

FVector UTurretComponent::ProjectileOffset = FVector::ZeroVector

◆ RandomTargetingRotationDelay

float UTurretComponent::RandomTargetingRotationDelay = 3.0f
protected

◆ RandomTargetingRotationPitch

FVector2D UTurretComponent::RandomTargetingRotationPitch = FVector2D(-45.0f, 45.0f)
protected

◆ RandomTargetingRotationYaw

FVector2D UTurretComponent::RandomTargetingRotationYaw = FVector2D(0.0f, 360.0f)
protected

◆ Range

float UTurretComponent::Range = 15000.0f
protected

◆ Target

TWeakObjectPtr<AActor> UTurretComponent::Target = NULL
protected

◆ TargetAcquiredFireDelay

float UTurretComponent::TargetAcquiredFireDelay = 1.0f
protected

◆ TargetingAngle

float UTurretComponent::TargetingAngle = 45.0f
protected

◆ TargetingDelayTimer

FTimerHandle UTurretComponent::TargetingDelayTimer
protected

◆ TurretWidgetClass

TSubclassOf<class UTurretOverlayWidget> UTurretComponent::TurretWidgetClass = NULL
protected

◆ WeaponInstanceClass

TSubclassOf<class UWeaponInstanceProjectile> UTurretComponent::WeaponInstanceClass = NULL
protected

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