Projectile Weapon

made a gun that can kill the enemy.

# Conflicts:
#	scenes/enemy.tscn
#	scenes/player.tscn
#	scenes/test_scene.tscn
#	scripts/UltimatePlatformerController.gd
This commit is contained in:
sam committed 2026-10-03 16:08:19 -06:00
1 parent 2ecc24ae71
commit 90111f8b39
14 files changed
+166 -63

No files matched your search

+7 -3
View File
@@ -1,6 +1,6 @@
[gd_scene format=3 uid="uid://bjk1cmuogswyd"]
[gd_scene format=3 uid="uid://dxx6mxv6x5yws"]
[ext_resource type="Script" uid="uid://2jmspsmp5wpm" path="res://scripts/enemy.gd" id="1_7p1mj"]
[ext_resource type="Script" uid="uid://su208qu0ehcs" path="res://scenes/enemy.gd" id="1_7p1mj"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
size = Vector2(168, 167)
@@ -10,7 +10,7 @@ size = Vector2(178, 168)
[node name="enemy" type="CharacterBody2D" unique_id=1471932521]
collision_layer = 4
collision_mask = 3
collision_mask = 11
script = ExtResource("1_7p1mj")
[node name="ColorRect" type="ColorRect" parent="." unique_id=519837051]
@@ -24,9 +24,13 @@ shape = SubResource("RectangleShape2D_aqe1g")
[node name="Timer" type="Timer" parent="." unique_id=356300230]
[node name="Area2D" type="Area2D" parent="." unique_id=461696644]
collision_layer = 4
collision_mask = 11
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=72940614]
position = Vector2(84, 79)
shape = SubResource("RectangleShape2D_yg5ta")
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"]
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]