feat: added HUD object

This commit is contained in:
Sara 2025-08-10 20:53:27 +02:00
parent 3ceabd50eb
commit 7e3afd6c64
9 changed files with 64 additions and 20 deletions

View file

@ -1,5 +1,6 @@
#include "rifle.h"
#include "scene/animation/animation_player.h"
#include "wave_survival/heads_up_display.h"
#include "wave_survival/hitscan_muzzle.h"
#include "wave_survival/macros.h"
#include "wave_survival/player_body.h"
@ -17,11 +18,13 @@ void Rifle::_bind_methods() {
void Rifle::queue_enter_alt() {
get_anim()->queue("hip_to_aim");
get_anim()->queue("aim");
HeadsUpDisplay::get_singleton()->set_reticle_visibility(false);
}
void Rifle::queue_exit_alt() {
get_anim()->queue("aim_to_hip");
get_anim()->queue("hip");
HeadsUpDisplay::get_singleton()->set_reticle_visibility(true);
}
void Rifle::queue_enter_run() {