Modular Turret C++ Plugin  Version 3
Turret C++ Unreal engine 4 plugin
AMortarProjectile Class Reference
+ Inheritance diagram for AMortarProjectile:
+ Collaboration diagram for AMortarProjectile:

Public Member Functions

 AMortarProjectile ()
 
void ExplosionEvent ()
 
float GetDestoryDelay () const
 
float GetProjectileDamage () const
 
void SetAvoidSameTeamDamage (const bool &ShouldAvoidSameDamage)
 
void SetDestroyDelay (const float &DestroyDelay)
 
void SetProjectileDamage (const float &ProjectileDamage)
 
bool ShouldAvoidSameTeamDamage () const
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual void OnHit (UPrimitiveComponent *HitComponent, AActor *OtherActor, UPrimitiveComponent *OtherComponent, FVector NormalImpulse, const FHitResult &Hit)
 
virtual void ProjectileDestroyerTimer ()
 

Protected Attributes

bool bAvoidSameTeamDamage = false
 
UStaticMeshComponent * CollisionMesh = nullptr
 
float DestroyDelay = 2.f
 
class URadialForceComponent * ExplosionForce = nullptr
 
UParticleSystemComponent * ImpactBlast = nullptr
 
class USoundBase * ImpactSound
 
UParticleSystemComponent * LaunchBlast = nullptr
 
class UNiagaraComponent * NiagaraImpactBlast = nullptr
 
class UNiagaraComponent * NiagaraLaunchBlast = nullptr
 
class UNiagaraComponent * NiagaraTrailParticle = nullptr
 
float ProjectileDamage = 10.f
 
class UProjectileMovementComponent * ProjectileMovement = nullptr
 
UParticleSystemComponent * TrailParticle = nullptr
 

Detailed Description

Projectile Base class which includes all the logic of projectile launching damaging etc

Constructor & Destructor Documentation

◆ AMortarProjectile()

AMortarProjectile::AMortarProjectile ( )

Member Function Documentation

◆ BeginPlay()

virtual void AMortarProjectile::BeginPlay ( )
overrideprotectedvirtual

Called when the game starts or when spawned

◆ ExplosionEvent()

void AMortarProjectile::ExplosionEvent ( )

Event Called Before Doing Blast This is a blueprintImplementableEvent which has to be used in blueprint

◆ GetDestoryDelay()

float AMortarProjectile::GetDestoryDelay ( ) const

Gets Destory Delay for Each Projectile After it hits a surface return Float Variable Containing Projectile Delay

◆ GetProjectileDamage()

float AMortarProjectile::GetProjectileDamage ( ) const

Gets Damage Done by Each Projectile Hit on the Character return Float Variable Containing Projectile Damage

◆ OnHit()

virtual void AMortarProjectile::OnHit ( UPrimitiveComponent *  HitComponent,
AActor *  OtherActor,
UPrimitiveComponent *  OtherComponent,
FVector  NormalImpulse,
const FHitResult &  Hit 
)
protectedvirtual

On Every Collision of Projectile This Function will be called.This is Called on ComponentHit Function of Collision Mesh of Projectile Mesh.

See also
https://docs.unrealengine.com/en-US/API/Runtime/Engine/Components/UPrimitiveComponent/OnComponentHit/index.html

Reimplemented in AMortarMineProjectile.

◆ ProjectileDestroyerTimer()

virtual void AMortarProjectile::ProjectileDestroyerTimer ( )
protectedvirtual

Function To Delete Projectiles Actor

◆ SetAvoidSameTeamDamage()

void AMortarProjectile::SetAvoidSameTeamDamage ( const bool &  ShouldAvoidSameDamage)

Sets whether same team damage is allowed or not

Parameters
[in]ShouldAvoidSameDamageBoolean Value true to avoid same team damage ,false otherwise

◆ SetDestroyDelay()

void AMortarProjectile::SetDestroyDelay ( const float &  DestroyDelay)

Sets Time after which each Projectile will get destroyed after hitting the target Avoid Keeping the value too big for performance issue

Parameters
[in]DestroyDelayProjectile Destroy Delay

◆ SetProjectileDamage()

void AMortarProjectile::SetProjectileDamage ( const float &  ProjectileDamage)

Sets Projectile Done by each projectile Hit

Parameters
[in]ProjectileDamageProjectile Damage Amount

◆ ShouldAvoidSameTeamDamage()

bool AMortarProjectile::ShouldAvoidSameTeamDamage ( ) const

Returns True if Same Team Damage is off, false otherwise

Returns
Returns True if same team damage is not allowed

Member Data Documentation

◆ bAvoidSameTeamDamage

bool AMortarProjectile::bAvoidSameTeamDamage = false
protected

Whether To Avoid Same Team Damage

◆ CollisionMesh

UStaticMeshComponent* AMortarProjectile::CollisionMesh = nullptr
protected

Mesh of projectile Which will enable collision event

◆ DestroyDelay

float AMortarProjectile::DestroyDelay = 2.f
protected

Time after which projectiles will be deleted. Avoid keep it too large

◆ ExplosionForce

class URadialForceComponent* AMortarProjectile::ExplosionForce = nullptr
protected

This is impulse Force x change in time see wikipedia

◆ ImpactBlast

UParticleSystemComponent* AMortarProjectile::ImpactBlast = nullptr
protected

Particle System That will be emitted on impact

◆ ImpactSound

class USoundBase* AMortarProjectile::ImpactSound
protected

Sound Played on Particle Hit

◆ LaunchBlast

UParticleSystemComponent* AMortarProjectile::LaunchBlast = nullptr
protected

Particle System That will be emitted on Launch from Mortar Gun

◆ NiagaraImpactBlast

class UNiagaraComponent* AMortarProjectile::NiagaraImpactBlast = nullptr
protected

Particle System That will be emitted on impact

◆ NiagaraLaunchBlast

class UNiagaraComponent* AMortarProjectile::NiagaraLaunchBlast = nullptr
protected

Particle System That will be emitted on Launch from Mortar Gun

◆ NiagaraTrailParticle

class UNiagaraComponent* AMortarProjectile::NiagaraTrailParticle = nullptr
protected

Particle System That will be used on the Projectile Mesh like Smoke Trail etc

◆ ProjectileDamage

float AMortarProjectile::ProjectileDamage = 10.f
protected

Damage To Be Done By each Projectile on Successfull Hit

◆ ProjectileMovement

class UProjectileMovementComponent* AMortarProjectile::ProjectileMovement = nullptr
protected

◆ TrailParticle

UParticleSystemComponent* AMortarProjectile::TrailParticle = nullptr
protected

Particle System That will be used on the Projectile Mesh like Smoke Trail etc


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