Added more flexible player damage from enemies and cleaned up some code
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 12.0
|
||||
|
||||
[node name="Creepy Hand" type="Area2D" groups=["enemy_hitbox"]]
|
||||
[node name="Creepy Hand" type="Area2D" groups=["enemy_projectile_1"]]
|
||||
light_mask = 0
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
collision_layer = 0
|
||||
|
Reference in New Issue
Block a user