Updated mirror wave; tweaked CRT movement

This commit is contained in:
Henry 2026-02-27 01:05:55 +00:00
parent 7e75a96795
commit 78472ee95c
28 changed files with 938 additions and 32 deletions

View file

@ -25,6 +25,7 @@ func _ready():
EventBus.player_died.connect(_on_player_died)
#EventBus.enemy_died.connect(_on_enemy_died)
EventBus.enemy_hit.connect(_on_enemy_hit)
EventBus.flash_screen.connect(_on_flash_screen)
#func spawn_enemies():
@ -90,6 +91,7 @@ func new_game():
$CanvasLayer/Title.hide()
# Ensure enemies are cleared.
get_tree().call_group("enemies", "queue_free")
get_tree().call_group("shards", "queue_free")
get_tree().call_group("enemy_bullets", "queue_free")
# print("Number of enemies at new_game: ",enemy_count)
enemy_count = 0
@ -145,3 +147,15 @@ func win_game():
game_over.hide()
$CanvasLayer/Title.show()
start_button.show()
func _on_flash_screen(duration: float):
print("flash!")
$CanvasLayer/ColorRect.visible = true
await get_tree().create_timer(duration).timeout
#var tween = create_tween().set_parallel(false)
#tween.tween_property($CanvasLayer/ColorRect.material, "intensity", 1.0, duration)
#tween.set_ease(Tween.EASE_IN_OUT).tween_property($CanvasLayer/ColorRect.material, "intensity", 0.0, duration)
#await tween.finished
print("flash finished!")
$CanvasLayer/ColorRect.visible = false