On the advice of Sophie, I adjusted the shader settings on the resource

to be local to the scene so not all CRTs flashed when one got hit.
This commit is contained in:
Henry 2026-03-01 12:21:40 +00:00
parent aae3238906
commit 4f0eff986f
5 changed files with 44 additions and 41 deletions

View file

@ -19,33 +19,32 @@ func _on_visible_on_screen_notifier_2d_screen_exited() -> void:
func _on_area_entered(area: Area2D) -> void:
var enemies = get_tree().get_nodes_in_group("enemies")
if area.is_in_group("enemies"):
#for enemy in enemies:
match enemies.enemy_type:
"crt":
if area.is_in_group("enemies"):
print("CRT hit!")
area.hit_detection()
queue_free()
"shards":
if area.is_in_group("shards"):
print("Shards hit!")
area.hit_detection()
"mirror":
if area.is_in_group("enemies"):
print("Mirror hit!")
area.hit_detection()
queue_free()
"chicken":
if area.is_in_group("enemies"):
print("Chicken hit!")
match area.enemy_type:
"crt":
if area.is_in_group("enemies"):
print("CRT hit!")
area.hit_detection()
queue_free()
"shards":
if area.is_in_group("shards"):
print("Shards hit!")
area.hit_detection()
"mirror":
if area.is_in_group("enemies"):
print("Mirror hit!")
area.hit_detection()
queue_free()
"chicken":
if area.is_in_group("enemies"):
print("Chicken hit!")
area.hit_detection()
queue_free()
#func bullet_fx():
#shader_active = true