|
| virtual void | BeginPlay () override |
| |
| virtual void | TakeDamage (AActor *DamagedActor, float Damage, const class UDamageType *DamageType, class AController *InstigatedBy, AActor *DamageCauser) |
| |
◆ UMortarHealthComponent()
| UMortarHealthComponent::UMortarHealthComponent |
( |
| ) |
|
◆ BeginPlay()
| virtual void UMortarHealthComponent::BeginPlay |
( |
| ) |
|
|
overrideprotectedvirtual |
Called when the game starts or when spawned
◆ CheckIsCriticalHealth()
| void UMortarHealthComponent::CheckIsCriticalHealth |
( |
| ) |
|
Checks if the health is critical and calls a blueprint event if it gets low or stops critical Health event when health restores
◆ GetCriticalHealthThresholdPercentage()
| float UMortarHealthComponent::GetCriticalHealthThresholdPercentage |
( |
| ) |
const |
Returns Critical Health Percentage.
- Returns
- CriticalHealth Percentage in float
◆ GetDefaultHealth()
| int32 UMortarHealthComponent::GetDefaultHealth |
( |
| ) |
const |
Getter function for Default Health
- Returns
- Default Health of an actor
◆ GetHealth()
| int32 UMortarHealthComponent::GetHealth |
( |
| ) |
const |
Returns The Current Health of the ACtor
- Returns
- Current Health which is clamped to max Health
◆ GetHealthPercentage()
| float UMortarHealthComponent::GetHealthPercentage |
( |
| ) |
const |
Returns Health Left Percentage.
- Returns
- Health Percentage in float
◆ GetMaxHealth()
| int32 UMortarHealthComponent::GetMaxHealth |
( |
| ) |
const |
Getter function for Max Health
- Returns
- [in] Max Health of an actor
◆ IsDead()
| bool UMortarHealthComponent::IsDead |
( |
| ) |
const |
Checks if an actor is dead by checking the current Health
- Returns
- Returns True if Current Health less than and equal to 0, false otherwise
◆ ResetHealth()
| void UMortarHealthComponent::ResetHealth |
( |
| ) |
|
Resets The Actor Health to the Default Health
◆ SetCurrentHealth()
| void UMortarHealthComponent::SetCurrentHealth |
( |
const int32 & |
Health | ) |
|
Sets The Current Health of the ACtor
- Parameters
-
| [in] | Health | Current Health which is clamped to max Health |
◆ SetDefaultHealth()
| void UMortarHealthComponent::SetDefaultHealth |
( |
const int32 & |
Health | ) |
|
Sets The Default Health an actor This will also be clamped to MaxHealth
- Parameters
-
| [in] | Health | Default Health of an actor |
◆ SetMaxHealth()
| void UMortarHealthComponent::SetMaxHealth |
( |
const int32 & |
Health | ) |
|
Sets The Maximum Health an actor can achieve
- Parameters
-
◆ TakeDamage()
| virtual void UMortarHealthComponent::TakeDamage |
( |
AActor * |
DamagedActor, |
|
|
float |
Damage, |
|
|
const class UDamageType * |
DamageType, |
|
|
class AController * |
InstigatedBy, |
|
|
AActor * |
DamageCauser |
|
) |
| |
|
protectedvirtual |
◆ ActorDeadEvent
| FMortarDeadEvent UMortarHealthComponent::ActorDeadEvent |
Blueprint Event which is called when Actor Dies
◆ bIsCriticalHealthEventCalled
| uint32 UMortarHealthComponent::bIsCriticalHealthEventCalled |
|
private |
Boolean Flag to check whether the event for critical Health is called
◆ bIsDeadEventCalled
| uint32 UMortarHealthComponent::bIsDeadEventCalled |
|
private |
Boolean Flag to check whether the event for Death is called
◆ CriticalHealthEvent
| FMortarCriticalHealthEvent UMortarHealthComponent::CriticalHealthEvent |
Blueprint Event which is called when health drops beyond a critical threshold
◆ CriticalHealthPercentage
| float UMortarHealthComponent::CriticalHealthPercentage = 25 |
|
private |
This is the percentage beyond which the critical Health event will be called
◆ CriticalHealthThreshold
| float UMortarHealthComponent::CriticalHealthThreshold = 20 |
|
private |
Critical Health Threshold Limit beyond which an event will be generated It will be CriticalHealthPercentage * MaxHealth
◆ CrticalHealthRecoverEvent
| FMortarCriticalHealthRecoverEvent UMortarHealthComponent::CrticalHealthRecoverEvent |
Blueprint Event which is called when health restores and gets above a critical threshold
◆ CurrentHealth
| int32 UMortarHealthComponent::CurrentHealth = 100 |
|
private |
Current Health of an Actor
◆ DefaultHealth
| int32 UMortarHealthComponent::DefaultHealth = 100 |
|
private |
Default Health of an Actor
◆ MaxHealth
| int32 UMortarHealthComponent::MaxHealth = 100 |
|
private |
Maximum Health of an Actor
The documentation for this class was generated from the following file: