Added more flexible player damage from enemies and cleaned up some code

This commit is contained in:
VoidTwo
2021-12-05 14:55:47 -06:00
parent 9101bf2f65
commit b8cb1fa69b
7 changed files with 32 additions and 11 deletions

View File

@@ -17,6 +17,7 @@ height = 2.0
radius = 50.0
[node name="Chasing Glowing Ghost" type="KinematicBody2D" groups=["enemy"]]
light_mask = 0
collision_layer = 4
collision_mask = 5
script = ExtResource( 4 )
@@ -29,19 +30,23 @@ offset = Vector2( 0, 0.5 )
[node name="Collision" type="CollisionShape2D" parent="."]
visible = false
light_mask = 0
rotation = 1.5708
shape = SubResource( 3 )
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox_1"]]
light_mask = 0
collision_layer = 4
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
visible = false
light_mask = 0
position = Vector2( 0, -2.5 )
shape = SubResource( 1 )
[node name="Player Detector" type="Area2D" parent="."]
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
@@ -49,11 +54,12 @@ monitorable = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector"]
visible = false
light_mask = 0
shape = SubResource( 2 )
[node name="Light" type="Light2D" parent="."]
scale = Vector2( 0.5, 0.5 )
texture = ExtResource( 2 )
texture_scale = 0.5
color = Color( 0.984314, 0.94902, 0.211765, 0.392157 )
energy = 2.0
range_item_cull_mask = 11
@@ -63,6 +69,7 @@ scale = Vector2( 0.1, 0.1 )
texture = ExtResource( 2 )
offset = Vector2( 5, -35 )
range_item_cull_mask = 4
shadow_item_cull_mask = 0
[node name="Occluder" type="LightOccluder2D" parent="."]
show_behind_parent = true