# Rally Rush: godot::DamageArea Class Reference

Loading...
Searching...
No Matches
godot::DamageArea Class Reference

Collision area that damages nodes of the given types when entered. More...

`#include <damage_area.hpp>`

Inheritance diagram for godot::DamageArea:

## Public Member Functions

virtual void | _enter_tree () override
| Register body_entered observer. Get animation player if applicable. Get parent if applicable.
virtual void | _process (double delta_time) override
| Animate until end, destroy if animation has ended.

## Protected Member Functions

void | body_entered (Node3D *node)
| If the node is of a class referenced in target_classes, deal damage.
void | set_target_classes (Array array)
| Node classes to deal damage to.
Array | get_target_classes () const
| Node classes to deal damage to.

## Private Member Functions

| GDCLASS (DamageArea, Area3D)

## Static Private Member Functions

static void | _bind_methods ()
| Bind editor properties.

## Private Attributes

Vector< StringName > | target_classes {}
AnimationPlayer * | anim {nullptr}

## Detailed Description

Collision area that damages nodes of the given types when entered.

## Member Function Documentation

## _bind_methods()

void godot::DamageArea::_bind_methods | ( |  | ) |

staticprivate

Bind editor properties.

## _enter_tree()

void godot::DamageArea::_enter_tree | ( |  | ) |

overridevirtual

Register body_entered observer. Get animation player if applicable. Get parent if applicable.

## _process()

void godot::DamageArea::_process | ( | double | delta_time | ) |

overridevirtual

Animate until end, destroy if animation has ended.

## body_entered()

void godot::DamageArea::body_entered | ( | Node3D * | node | ) |

protected

If the node is of a class referenced in target_classes, deal damage.

## GDCLASS()

godot::DamageArea::GDCLASS | ( | DamageArea | ,
|  | Area3D |
| ) |  |

private

## get_target_classes()

Array godot::DamageArea::get_target_classes | ( |  | ) | const

protected

Node classes to deal damage to.

## set_target_classes()

void godot::DamageArea::set_target_classes | ( | Array | array | ) |

protected

Node classes to deal damage to.

## Member Data Documentation

## anim

AnimationPlayer* godot::DamageArea::anim {nullptr}

private

## target_classes

Vector<StringName> godot::DamageArea::target_classes {}

private

The documentation for this class was generated from the following files:

- src/damage_area.hpp
- src/damage_area.cpp