![]() |
Mortar Pro Plugin
Version 2
Modular Turret Plugin
|
#include <MortarProBeamAimingComponent.h>
Public Member Functions | |
void | BeamProjectileDestroyed (AActor *Actor) |
float | GetAmmoReducerInitialDelay () const |
float | GetAmmoReducerRate () const |
void | ResetAimingRunTimeParameters () override |
void | SetAmmoReducerInitialDelay (const float &Delay) |
void | SetAmmoReducerRate (const float &Rate) |
UMortarProBeamAimingComponent () | |
![]() | |
void | FireAt (const FVector &AimLocation, AActor *TargetActor, TArray< AActor * > SecondaryTargetsRef) |
void | GetAllFiringSocketsName (TArray< FName > &SocketsName) const |
EMortarProFiringState | GetCurrentState () const |
float | GetDirectionThresholdComparision () const |
void | GetFiringCountForAllSockets (TMap< FName, int32 > &PerSocketFireCount) const |
int32 | GetFiringCountForSocket (const FName &SocketName) const |
float | GetInitialIdleEventDelay () const |
void | GetProjectile (TMap< FName, FMortarProGunSocketProperties > &OutProjectiles) const |
float | GetShotsSpreadDegree () const |
bool | HasAmmo () const |
bool | HasUnlimitedAmmo () const |
void | InitializeAiming (class UMortarProTurretMeshComponent *TurretToSet, class UMortarProBarrelMeshComponent *BarrelToSet, AActor *Owner) |
bool | IsGunGravityEnabled () const |
bool | IsPredictTargetPositionEnabled () const |
virtual void | ResetAimingRunTimeParameters () |
void | SetDirectionThresholdComparision (const float &Threshold) |
void | SetFiringLeftForAllSockets (const TMap< FName, int32 > &PerSocketFireCount) |
void | SetFiringLeftForSocket (const FName &SocketName, const int32 &InFiringLeft) |
void | SetGunGravity (const bool &bGunGravity) |
void | SetIdle () |
void | SetInitialIdleEventDelay (const float &Delay) |
void | SetPredictTargetPosition (const bool &bEnable) |
void | SetProjectile (const TMap< FName, FMortarProGunSocketProperties > &ProjectileToSet) |
void | SetShotsSpreadDegree (const float &ShotsSpread) |
void | SetUnlimitedAmmo (const bool &bUnlimited) |
virtual void | StopComponent () |
UMortarProAimingComponent () | |
Protected Member Functions | |
void | Fire () override |
void | FireBeam () |
void | SetBarrelState () override |
void | StopFiring () override |
![]() | |
virtual void | BeginPlay () override |
virtual void | Fire () |
virtual void | FireProjectile () |
class UMortarProPoolSubsystem * | GetValidSubSystem () |
bool | IsMoving (const FVector &HitLocation) |
virtual void | SetBarrelState () |
virtual void | StopFiring () |
virtual void | TickComponent (float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override |
Private Member Functions | |
void | AmmoReducerTimer () |
bool | PreFire () |
Private Attributes | |
float | AmmoReducerInitialDelay = 0.1f |
float | AmmoReducerRate = 0.1f |
FTimerHandle | AmmoReducerTimerHandle |
uint32 | bShotFired: 1 |
Aiming Component for shooting target in a continuous beam like a flame thrower or a laser beam
UMortarProBeamAimingComponent::UMortarProBeamAimingComponent | ( | ) |
|
private |
Timer Call back function for reducing ammo
void UMortarProBeamAimingComponent::BeamProjectileDestroyed | ( | AActor * | Actor | ) |
Callback function for Projectile actor when it is destroyed
[in] | Actor | Actor that is getting destroyed |
|
overrideprotectedvirtual |
This method is called to fire a projectile from AI
Reimplemented from UMortarProAimingComponent.
|
protected |
After checking the condition before firing this function will be called to fire a beam projectile that will reside until no ammo is there or the target/owner is dead or the barrel is moving
float UMortarProBeamAimingComponent::GetAmmoReducerInitialDelay | ( | ) | const |
Returns Delay in float after which we decrease ammo
float UMortarProBeamAimingComponent::GetAmmoReducerRate | ( | ) | const |
Returns Rate in float by which we decrease ammo
|
private |
Operations or Checks to perform before Firing
|
overridevirtual |
Resets all Shooting runtime Parameters for Beam Shooting Mode It will also stop firing
Reimplemented from UMortarProAimingComponent.
void UMortarProBeamAimingComponent::SetAmmoReducerInitialDelay | ( | const float & | Delay | ) |
Setter function to set delay in float after which we decrease ammo
[in] | Delay | in float after which we decrease ammo count |
void UMortarProBeamAimingComponent::SetAmmoReducerRate | ( | const float & | Rate | ) |
Setter function to set Rate in float by which we decrease ammo
[in] | Rate | in float by which we decrease ammo count |
|
overrideprotectedvirtual |
Sets Barrel State like whether there is any ammo left,or gun is moving or beam firing
Reimplemented from UMortarProAimingComponent.
|
overrideprotectedvirtual |
Function called to stop Firing.Stop Existing Beam firing Also Call back function when Projectile Actor especially MortarProPoolable Actor is destroyed by user ideally it should not happen
Reimplemented from UMortarProAimingComponent.
|
private |
Initial Delay after which we reduce the ammo
|
private |
Timer Rate by which reduce ammo
|
private |
Timer Handle for ammo reducer timer
|
private |
Flag Denoting whether any shot was fired