HealthModifier - cluttered-code/godot-health-hitbox-hurtbox GitHub Wiki
inherits: Resource
A HealthModidifier
applies more information to a HealthAction.
Description
A HealthModifier
applies additional information to a HealthAction adjusting amount and changing affects and types.
Tutorials
Properties
type | name | default |
---|---|---|
int | incrementer | 0 |
float | multiplier | 1.0 |
Health.Affect | convert_affect | Health.Affect.NONE |
HeathActionType.Enum | convert_type | HealthActionType.Enum.NONE |
Methods
return | function |
---|---|
HealthModifier |
new() |
HeatlhModifier |
clone() |
Property Descriptions
incrementer
@export var incrementer: int = 0
The value to add to the HealthAction amount, positive or negative. Added before multiplier calculated.
multiplier
@export var multiplier: float = 1.0
The value
convert_affect
@export var convert_affect: Health.Affect = Health.Affect.NONE
Changes the affect this will have on a Health component.
convert_type
@export var convert_type: HealthActionType.Enum = HealthActionType.Enum.NONE
Change the type of action being performed, used to apply HealthModifier.
Method Descriptions
new
new(
incrementer: int = 0,
multiplier: float = 1.0,
convert_affect: Health.Affect = Health.Affect.NONE,
convert_type: HealthActionType.Enum = HealthActionType.Enum.NONE
) -> HealthModifier
Construct a new HealthModifier
.
clone
clone() -> HealthModifier
Duplicates and returns a new HealthModifier
. Can't use duplicate()
because _init()
has parameters.