aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bullet.gd2
-rw-r--r--HUD.tscn6
-rw-r--r--Node.gd0
3 files changed, 6 insertions, 2 deletions
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()
diff --git a/HUD.tscn b/HUD.tscn
index b0f7ca6..640ba79 100644
--- a/HUD.tscn
+++ b/HUD.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=6 format=2]
+[gd_scene load_steps=7 format=2]
[ext_resource path="res://HealthBar.gd" type="Script" id=1]
[ext_resource path="res://Wordart.gd" type="Script" id=2]
@@ -8,6 +8,9 @@
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0, 1, 0, 1 )
+[sub_resource type="StyleBoxFlat" id=2]
+bg_color = Color( 0, 0, 0, 1 )
+
[node name="HUD" type="CanvasLayer"]
[node name="HBoxContainer" type="HBoxContainer" parent="."]
@@ -31,6 +34,7 @@ margin_bottom = 14.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/fg = SubResource( 1 )
+custom_styles/bg = SubResource( 2 )
value = 100.0
script = ExtResource( 1 )
diff --git a/Node.gd b/Node.gd
deleted file mode 100644
index e69de29..0000000
--- a/Node.gd
+++ /dev/null