Ennemy

Node representing an ennemy, controlled by the computer.

Inherits : Entity

Description

This Node represent an ennemy, controlled by the computer (need to make IA yet).

It’s an Entity, and simply modify some general behavior into more specific ones :

  • Change a few characteristics

Methods description

_ready()

Method starting animations, adding the Node to the enemies group, and changing a few Entity characteristics.

_physics_process(delta)

Arguments

delta
Delta (see Godot documentation for more details).
This method takes care of the physics engine processing.
It selects a new target if no target are selected, it moves the ennemy according to the base velocity and the knockback velocity if any, and it emits the right signal depending if the ennemy is running or not.

_on_HealthBar_dead()

Free itself upon receiving the dead signal.

Receives signals

dead
This signal is emitted when the healthbar reach 0.