HealthAction - cluttered-code/godot-health-hitbox-hurtbox GitHub Wiki

inherits: Resource

An action that can be performed on a Health component.

Description

A HealthAction represents a single action that can performed on a Health component to.

Tutorials

Properties

type name default
Health.Affect affect Health.Affect.DAMAGE
HeathActionType.Enum type HealthActionType.Enum.KINETIC
int amount 1

Methods

return function
HealthAction new()
HeatlhAction clone()

Property Descriptions

affect

@export var affect: Health.Affect = Health.Affect.DAMAGE

The affect this will have on a Health component.

type

@export var type: HealthActionType.Enum = HealthActionType.Enum.KINETIC

The type of action being performed, used to apply HealthModifier.

amount

@export var amount: int = 1

The amount to apply to the Health component.

Method Descriptions

new

new(affect: Health.Affect = Health.Affect.DAMAGE, type: HealthActionType.Enum = HealthActionType.Enum.KINETIC, amount: int = 1) -> HealthAction

Construct a new HealthAction.

clone

clone() -> HealthAction

Duplicates and returns a new HealthAction. Can't use duplicate() because _init() has parameters.