Player¶
Node representing the playable character.
Inherits : Entity
Description¶
This Node represent the playable character.
It’s an Entity, and simply modify some general behavior into more specific ones :
- Change a few characteristics
- Firing projectile is bow-specific
Methods description¶
_ready()
¶
Method starting animations, adding the Node to the players
group, and changing a few Entity characteristics.
_process()
¶
Arguments
|
This method is executed every frame and do several things :
- If the player don’t have a target anymore, select a new one.
- Get the input from user and set a new destination accordingly, as well as animation. It does not move the player, simply set the new destination.
- Emit right signal depending if the player is running or not.
Emitted signals |
_physics_process(delta)
¶
Arguments
|
This method takes care of the physics engine processing : it moves the player according to :
- The base velocity of the player (computed from the destination, set in
_process()
) - The knockback velocity, if any.
_on_HealthBar_dead()
¶
Free itself upon receiving the dead signal.
Receives signals
|