From 05911efcab3d011164e617915872c15fda45a53b Mon Sep 17 00:00:00 2001 From: freddie-a <57713959+freddie-a@users.noreply.github.com> Date: Sun, 30 Oct 2022 01:52:31 +0100 Subject: Set background for health bar --- Bullet.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bullet.gd') diff --git a/Bullet.gd b/Bullet.gd index e547bef..96e69c2 100644 --- a/Bullet.gd +++ b/Bullet.gd @@ -17,7 +17,7 @@ func _physics_process(delta): velocity = move_and_slide(velocity) for i in get_slide_count(): var collision = get_slide_collision(i) - if collision.collider: + if collision.collider and "Enemy" in collision.collider.get_name(): collision.collider.free() if velocity == Vector2(0.0, 0.0): queue_free() -- cgit v1.2.3-70-g09d2