Enemies now stay on screen after player dies, until start of new game.

This commit is contained in:
Henry 2025-12-23 14:28:35 +00:00
parent ec7a84c252
commit a20e496c2e
4 changed files with 17 additions and 3 deletions

View file

@ -38,7 +38,10 @@ func _on_enemy_died(value: int):
win_game()
func _on_player_died():
get_tree().call_group("enemies", "queue_free")
# get_tree().call_group("enemies", "queue_free")
EventBus.enemy_win.emit()
# $Player.set_process(false)
# $Player.monitoring = false
game_over.show()
await get_tree().create_timer(2).timeout
game_over.hide()
@ -46,6 +49,7 @@ func _on_player_died():
playing = false
func new_game():
get_tree().call_group("enemies", "queue_free")
Global.score = 0
# EventBus.initialize_shieldbar.emit()
$Player.start()