feat: started work on reloading
This commit is contained in:
parent
2d720a983a
commit
150231c67c
17 changed files with 63 additions and 33 deletions
|
|
@ -26,6 +26,11 @@ void Revolver::queue_idle_anim() {
|
|||
|
||||
void Revolver::start_running() {
|
||||
if (this->run_animation_timer <= 0.0) {
|
||||
if (this->alt_active) {
|
||||
get_anim()->queue("single_to_run");
|
||||
} else {
|
||||
get_anim()->queue("double_to_run");
|
||||
}
|
||||
get_anim()->queue("run");
|
||||
}
|
||||
}
|
||||
|
|
@ -36,7 +41,7 @@ void Revolver::stop_running() {
|
|||
if (current == "run") {
|
||||
get_anim()->stop();
|
||||
}
|
||||
if (current.begins_with("run")) {
|
||||
if (current.begins_with("run") || current.ends_with("run")) {
|
||||
if (this->alt_active) {
|
||||
get_anim()->queue("run_to_single");
|
||||
} else {
|
||||
|
|
@ -87,10 +92,14 @@ void Revolver::on_alt_mode(bool pressed) {
|
|||
}
|
||||
}
|
||||
|
||||
void Revolver::on_reload() {
|
||||
}
|
||||
|
||||
void Revolver::ready() {
|
||||
this->muzzle = cast_to<HitscanMuzzle>(get_node(NodePath("%HitscanMuzzle")));
|
||||
get_input()->connect(PlayerInput::sig_primary_fire, callable_mp(this, &self_type::on_primary_fire));
|
||||
get_input()->connect(PlayerInput::sig_alt_mode, callable_mp(this, &self_type::on_alt_mode));
|
||||
get_input()->connect(PlayerInput::sig_reload, callable_mp(this, &self_type::on_reload));
|
||||
play_equip_anim();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue