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

@@ -18,6 +18,7 @@ height = 2.0
radius = 60.0
[node name="Creepy Glowing Ghost" type="KinematicBody2D" groups=["enemy"]]
light_mask = 0
collision_layer = 4
collision_mask = 5
script = ExtResource( 4 )
@@ -35,7 +36,8 @@ 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
@@ -46,6 +48,7 @@ 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
@@ -57,8 +60,8 @@ 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.698039, 0.211765, 0.984314, 0.392157 )
energy = 2.0
range_item_cull_mask = 11
@@ -68,6 +71,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