Modular Turret C++ Plugin
Version 3
Turret C++ Unreal engine 4 plugin
|
Public Member Functions | |
void | ActorDeathEvent () |
void | ActorTeamChangeEvent () |
AMortar () | |
float | GetDestroyMortarDelay () const |
uint8 | GetRespawnCount () const |
bool | IsUnlimitedRespawnable () const |
void | OnActorEndRespawnEvent () |
void | OnActorStartRespawnEvent () |
void | SetDestroyMortarDelay (const float &DestroyDelay) |
void | SetResourceManager (UMortarResourceManager *resourceManager) |
void | SetRespawnCount (const uint8 &Count) |
void | SetUnlimitedRespawn (const bool &UnlimitedRespawning) |
Public Attributes | |
FMortarDeathEvent | OnMortarDeath |
FMortarPauseEvent | OnMortarPause |
FMortarResumeEvent | OnMortarResume |
Protected Member Functions | |
virtual void | BeginPlay () override |
virtual bool | CanBeSeenFrom (const FVector &ObserverLocation, FVector &OutSeenLocation, int32 &NumberOfLoSChecksPerformed, float &OutSightStrength, const AActor *IgnoreActor) const |
virtual float | TakeDamage (float DamageAmount, struct FDamageEvent const &DamageEvent, class AController *EventInstigator, AActor *DamageCauser) override |
Protected Attributes | |
class UWidgetComponent * | HealthBar = nullptr |
class UMortarAimingComponent * | MortarAimingComponent = nullptr |
class UStaticMeshComponent * | MortarBase = nullptr |
class UMortarBarrel * | MortarGun = nullptr |
class UMortarHealthComponent * | MortarHealthComponent = nullptr |
class UPawnNoiseEmitterComponent * | MortarNoiseEmitter = nullptr |
class UMortarTeamComponent * | MortarTeamComponent = nullptr |
class UMortarTurret * | MortarTurret = nullptr |
Private Member Functions | |
void | AfterMortarRespawn () |
void | MortarDestroy () |
void | OnTeamChangeDelegate () |
void | StartMortarRespawn () |
Private Attributes | |
bool | bUnlimitedRespawn = false |
uint32 | DestroyInProgress: 1 |
float | DestroyMortarDelay = 5.f |
class UMortarResourceManager * | ResourceManager |
uint8 | RespawnCount = 0 |
uint32 | RespawnInProgress: 1 |
float | RespawnShootingDelay = 2.f |
Main Actor Class for Mortar Project.This will contain three main components, Static Base Then Turret 3 Then Mortar Gun/Barrel
AMortar::AMortar | ( | ) |
void AMortar::ActorDeathEvent | ( | ) |
Event Called After Death. Blueprint event only Can Add Animation sound etc
void AMortar::ActorTeamChangeEvent | ( | ) |
Blue Print Event Called After Team Change
|
private |
Respawn Function Which after playing effect we want to resume firing
|
overrideprotectedvirtual |
Called when the game starts or when spawned
|
protectedvirtual |
Function to Override to allow seeing from Mortar Gun i.e Barrel More Info
float AMortar::GetDestroyMortarDelay | ( | ) | const |
Getter Function To get Delay after which mortar will be dstroyed after spawning limit has been exhausted
uint8 AMortar::GetRespawnCount | ( | ) | const |
Getter function to tell How Many Times Spawning Is Allowed.
bool AMortar::IsUnlimitedRespawnable | ( | ) | const |
Function to Get whether the mortar has infinite life( To infinity and beyond :) )
|
private |
Destroy Function Which will be called after death This will be called after the Destroy delay
void AMortar::OnActorEndRespawnEvent | ( | ) |
Event Called Before Respawning of Actor has been completed.
void AMortar::OnActorStartRespawnEvent | ( | ) |
Event Called Before Respawning of Actor after Death. Blueprint event only Can Add sounds,effets
|
private |
Delegate For On Team Change Event
void AMortar::SetDestroyMortarDelay | ( | const float & | DestroyDelay | ) |
Function to Set Time After which mortar actor will be destroyed from world
[in] | DestroyDelay | Time After Which to Destroy |
void AMortar::SetResourceManager | ( | UMortarResourceManager * | resourceManager | ) |
New Function This function is sets the subsystem for resourceManagement
[in] | resourceManager | Takes a Class Name of ResourceManager |
void AMortar::SetRespawnCount | ( | const uint8 & | Count | ) |
Function to How Many Times Spawning Is Allowed.Won't have any effect if Unlimited Spawning is on
[in] | Count | Total Times to Spawn |
void AMortar::SetUnlimitedRespawn | ( | const bool & | UnlimitedRespawning | ) |
Function to Set Unlimited Spawning
[in] | UnlimitedRespawning | True to Enable Unlimited Spawning False otherwise |
|
private |
Respawn Function Which will be called after death.Here Mainly we want to play respawn effects and sound This will be called after the respawn delay
|
overrideprotectedvirtual |
Function to afflict damage This will be called whenever the actor Receives damage
[in] | DamageAmount | Damage Amount |
[in] | DamageEvent | Data package that fully describes the damage received. |
[in] | EventInstigator | The Controller responsible for the damage. |
[in] | DamageCauser | Damage Causer Here In our example it will be Projectile Actor |
|
private |
Allow Unlimited Respawning of Mortar Actor.Each Time Mortar Dies then it will respawn after the mentioned delay with default attributes
|
private |
Destruction In Progress
|
private |
Time after which Mortar will be deleted
|
protected |
Health Bar Widget to be Configured in BP
|
protected |
Aiming Component Which Will handle all the aiming and shooting
|
protected |
Base Structure Mesh of the Mortar This is immovable object
|
protected |
Gun Moves Up and Down
|
protected |
Generic Health Component That will handle all the health related things.Can Be added to any actor
|
protected |
Noise Emitter For Pawn Hearing Sensing
|
protected |
Generic Team Component Telling which actor belongs to which team
|
protected |
Static Mesh that moves Right to Left
FMortarDeathEvent AMortar::OnMortarDeath |
Death Event That Will be Broadcasted as soon as Health Reaches 0 and Respawning Limit has been reached
FMortarPauseEvent AMortar::OnMortarPause |
Pause Event that will be broadcasted as soon as Health Reaches 0 like disabling AI camera etc
FMortarResumeEvent AMortar::OnMortarResume |
Resume Event that will be broadcasted after AI respawns
|
private |
Reference FOr REsource Manager. This needs to be set once only by anyone Used only for reference we wont be doing anything with this
|
private |
How Many Times Respawning is Allowed. Only Works if Unlimited Respawning if Off
|
private |
Respawning In Progress
|
private |
Time after which Mortar will be deleted