This commit is contained in:
Jonas Mucke
2020-04-20 10:09:07 +02:00
parent fc59452928
commit b8b026d063
12 changed files with 114 additions and 75 deletions

View File

@@ -22,6 +22,6 @@ func _physics_process(delta):
func _on_Hurtbox_area_entered(area):
lifePoints -= area.damage
if(lifePoints<0):
if(lifePoints<=0):
queue_free()
pass

View File

@@ -24,9 +24,11 @@ position = Vector2( 1.88936, -12.4698 )
position = Vector2( 0, -8 )
texture = ExtResource( 2 )
[node name="Hurtbox" parent="." instance=ExtResource( 1 )]
[node name="Hurtbox" parent="." groups=[
"HittableByPlayer",
] instance=ExtResource( 1 )]
collision_layer = 8
collision_mask = 0
collision_mask = 128
script = null
[node name="CollisionShape2D" parent="Hurtbox" index="0"]