|
Mortar Pro Plugin
Version 3
Modular Turret Plugin
|
#include <MortarProLineTraceProjectile.h>
Inheritance diagram for AMortarProLineTraceProjectile:
Collaboration diagram for AMortarProLineTraceProjectile:Public Member Functions | |
| AMortarProLineTraceProjectile () | |
| float | GetLineTraceSpeed () const |
| virtual float | GetProjectileSpeed () override |
| virtual void | SetAfterSpawnParam (const FMortarProAfterSpawnParam &AfterSpawnParam) override |
| void | SetLineTraceSpeed (const float &Speed) |
Public Member Functions inherited from AMortarProBaseProjectile | |
| void | BPOnImpactEvent () |
| virtual float | GetProjectileSpeed () |
| void | SetAfterSpawnBP (AActor *TargetToShoot, TArray< AActor * >SecondaryTargets, class UMortarProPoolSubsystem *PoolingSystem, bool bCanSplit=true, bool bGravityEnabled=false, FVector RandomOffset=FVector(0, 0, 0), FVector TargetPredictedPosition=FVector(0, 0, 0)) |
| virtual void | SetAfterSpawnParam (const FMortarProAfterSpawnParam &AfterSpawnParam) |
Public Member Functions inherited from AMortarProPoolableActor | |
| AMortarProPoolableActor () | |
| virtual void | DeActivateActor () |
| virtual void | ReActivateActor () |
| virtual void | SetDeactivateSpan (const float &Time) |
Protected Member Functions | |
| virtual void | ClearTimers () override |
| virtual void | EnableComponents (const bool &bEnable) override |
Protected Member Functions inherited from AMortarProBaseProjectile | |
| float | GetDamageAsPerSurface (const EPhysicalSurface &SurfaceType) |
| virtual void | InitializeBeforeSpawnParam () override |
| void | PlayImpactSoundAndParticleEffectForSurface (const EPhysicalSurface &SurfaceType, const FVector &Location) |
Protected Member Functions inherited from AMortarProPoolableActor | |
| virtual void | BeginPlay () override |
| virtual void | ClearTimers () |
| virtual void | EnableComponents (const bool &bEnable) |
| virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
| virtual void | InitializeBeforeSpawnParam () |
| virtual void | StartTimers () |
Protected Attributes | |
| float | LineTraceSpeed = 1500.f |
| class UNiagaraSystem * | NiagaraLaunchBlast = nullptr |
Protected Attributes inherited from AMortarProBaseProjectile | |
| TMap< TEnumAsByte< EPhysicalSurface >, float > | DamageAsPerSurface |
| FMortarProAfterSpawnParam | MortarAfterSpawnParam |
| TMap< TEnumAsByte< EPhysicalSurface >, class UNiagaraSystem * > | NiagaraSurfaceImpact |
| TMap< TEnumAsByte< EPhysicalSurface >, class USoundBase * > | SurfaceImpactSound |
Protected Attributes inherited from AMortarProPoolableActor | |
| uint32 | bIsActorActivated: 1 |
Private Member Functions | |
| void | LineTraceToTarget () |
Private Attributes | |
| uint32 | bEnableDebugTargetLineTrace: 1 |
| float | DrawTargetDebugLineDuration = 1.f |
| FTimerHandle | LineTraceToTargetTimerHandle |
| TEnumAsByte< ECollisionChannel > | TraceChannel = ECC_Camera |
Additional Inherited Members | |
Public Attributes inherited from AMortarProPoolableActor | |
| FMortarProActorActivated | BeginActivation |
| FMortarProActorDeactivated | BeginDeactivation |
| float | DeactivateSpan = 10.f |
Projectile class Derived from MortarProBaseProjectile class. This class does only Line Trace towards the target location Instead of physically moving the projectile. Should be used where physical movement is not required like bullets. For missile and other complex projectiles MortarProPhysicalProjectile should be used.
| AMortarProLineTraceProjectile::AMortarProLineTraceProjectile | ( | ) |
|
overrideprotectedvirtual |
Clears All Timers of the projectile. Also Called on deactivation
Reimplemented from AMortarProPoolableActor.
|
overrideprotectedvirtual |
Enables/Disables All Components.This is also called when reactivating/deactivating actor for reusability
| [in] | bEnable | boolean flag true to Enable and false to Disable Components |
Reimplemented from AMortarProPoolableActor.
| float AMortarProLineTraceProjectile::GetLineTraceSpeed | ( | ) | const |
Speed of Line Trace. We calculate the time to hit the target and do line trace after that
|
overridevirtual |
Gets Projectile Speed
Reimplemented from AMortarProBaseProjectile.
|
private |
Line Trace To Target. If it hits a target then it will apply damage to the target actor
|
overridevirtual |
Initializes Projectile params
| [in] | AfterSpawnParam | Parameters to set after spawning |
Reimplemented from AMortarProBaseProjectile.
| void AMortarProLineTraceProjectile::SetLineTraceSpeed | ( | const float & | Speed | ) |
Sets Speed of Line Trace. We cannot set speed directly we just calculate time to hit the target using this.
| [in] | Speed | Speed of Projectile |
|
private |
Whether to Draw Debug line from starting position to target
|
private |
Duration of Line trace from barrel to target
|
protected |
Speed of Line Trace. We calculate the time to hit the target and do line trace after that
|
private |
Timer Handle For Line Tracing to Target
|
protected |
Niagara System That will be emitted on Launch of this actor from Mortar Gun
|
private |
Collision Channel for Trace while doing collision Check