|
Mortar Pro Plugin
Version 3
Modular Turret Plugin
|
#include <MortarProBeamAimingComponent.h>
Inheritance diagram for UMortarProBeamAimingComponent:
Collaboration diagram for UMortarProBeamAimingComponent: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 () | |
Public Member Functions inherited from UMortarProAimingComponent | |
| 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 |
Protected Member Functions inherited from UMortarProAimingComponent | |
| 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 |
Additional Inherited Members | |
Public Attributes inherited from UMortarProAimingComponent | |
| FMortarProBeginAimingMovement | BeginAimingMovementTowardsTarget |
| FMortarProBeginFire | BeginFire |
| FMortarProBeginIdleState | BeginIdleState |
| FMortarProEndAimingMovement | EndAimingMovementTowardsTarget |
| FMortarProEndFiring | EndFiring |
| FMortarProEndIdleState | EndIdleState |
Protected Attributes inherited from UMortarProAimingComponent | |
| uint32 | bAmmoLeft: 1 |
| class UMortarProBarrelMeshComponent * | Barrel = nullptr |
| uint32 | bEnableBulletHell: 1 |
| uint32 | bEnableGunGravity: 1 |
| uint32 | bEnablePredictTargetPosition: 1 |
| uint32 | bUnlimitedAmmo: 1 |
| FVector | CurrentAimDirection = FVector(0, 0, 0) |
| EMortarProFiringState | CurrentFiringState |
| FVector | CurrentHitTargetLocation = FVector(0,0,0) |
| FVector | DefaultAimLocation = FVector(0,0,0) |
| FName | DefaultSocketName |
| class USoundBase * | FireSound { nullptr } |
| float | InitialIdleEventDelay = 4.f |
| float | LastFireTime = 0 |
| class AActor * | OwnerActor { nullptr } |
| FString | OwnerName |
| TMap< FName, FMortarProGunSocketProperties > | ProjectileSpawnSockets |
| float | ShotsSpreadDegree = 2.f |
| TWeakObjectPtr< AActor > | TargetActor |
| class UMortarProTurretMeshComponent * | Turret = nullptr |
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