Enemy
made a basic enemy that can harm/kill the player.
This commit is contained in:
1 parent
2315add8ec
commit
bb9682cd16
6 files changed
+117
-4
No files matched your search
+43
-1
@@ -5,8 +5,11 @@
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_d2by0"]
|
||||
size = Vector2(111, 105)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
|
||||
size = Vector2(114.5, 109)
|
||||
|
||||
[node name="player" type="CharacterBody2D" unique_id=1596338883]
|
||||
collision_mask = 2
|
||||
collision_mask = 6
|
||||
script = ExtResource("1_3vyb7")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=42689460]
|
||||
@@ -18,3 +21,42 @@ offset_bottom = 105.0
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1496788104]
|
||||
position = Vector2(55.5, 52.5)
|
||||
shape = SubResource("RectangleShape2D_d2by0")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="." unique_id=680224441]
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=736937610]
|
||||
position = Vector2(55.25, 52.5)
|
||||
shape = SubResource("RectangleShape2D_aqe1g")
|
||||
|
||||
[node name="health" type="Control" parent="." unique_id=1976293596]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="health" unique_id=110340136]
|
||||
self_modulate = Color(1, 0, 0, 1)
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = -42.0
|
||||
offset_right = 26.0
|
||||
offset_bottom = -20.0
|
||||
|
||||
[node name="ColorRect2" type="ColorRect" parent="health" unique_id=1043497392]
|
||||
self_modulate = Color(1, 0, 0, 1)
|
||||
layout_mode = 0
|
||||
offset_left = 37.0
|
||||
offset_top = -42.0
|
||||
offset_right = 60.0
|
||||
offset_bottom = -20.0
|
||||
|
||||
[node name="ColorRect3" type="ColorRect" parent="health" unique_id=175994440]
|
||||
self_modulate = Color(1, 0, 0, 1)
|
||||
layout_mode = 0
|
||||
offset_left = 70.0
|
||||
offset_top = -42.0
|
||||
offset_right = 93.0
|
||||
offset_bottom = -20.0
|
||||
|
||||
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
|
||||
Reference in new issue
Block a user