added freeze frame after death

This commit is contained in:
pennyrigate 2023-01-17 19:25:15 -05:00
parent 62c91bb21f
commit f4dda0ab1b
8 changed files with 53 additions and 5 deletions

View file

@ -250,12 +250,15 @@ func die():
get_parent().add_child(new_particles)
new_particles.global_position = global_position
new_particles.emitting = true
position = Game.respawn_point
Game.lives -= 1
sprite.visible = false
Game.play_sound(Game.a_die,Game.ac_die)
yield(Game.freeze_frame(0.3), "timeout")
position = Game.respawn_point
sprite.visible = true
current_state = State.IDLE
Game.lives -= 1
if Game.lives < 0:
Game.call_deferred("restart_level")
func _on_AnimationPlayer_animation_finished(anim_name):
#Return to idle after slash

View file

@ -707,6 +707,7 @@ shape = SubResource( 34 )
disabled = true
[node name="DeathSplatter" type="Particles2D" parent="."]
pause_mode = 2
emitting = false
amount = 16
lifetime = 0.3