working bullet factory

This commit is contained in:
Darius committed 2025-01-13 20:58:53 -05:00
1 parent 80a771f3a9
commit 205e8d43b5
9 files changed
+111 -5

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://dwfife67i1fmr"]
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_qivxv"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_dp02a"]
size = Vector2(16, 4)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_qivxv")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_dp02a")
debug_color = Color(1, 1, 0, 0.419608)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+1 -1
View File
@@ -2,7 +2,7 @@
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ixlbc"]
[node name="RigidBody2D" type="RigidBody2D"]
[node name="RigidBody2D" type="RigidBody2D" groups=["destructable"]]
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+10 -1
View File
@@ -1,9 +1,11 @@
[gd_scene load_steps=8 format=3 uid="uid://dcmyx5g6dksl8"]
[gd_scene load_steps=10 format=3 uid="uid://dcmyx5g6dksl8"]
[ext_resource type="PackedScene" uid="uid://d1ej2kiy7jcpv" path="res://scenes/crate.tscn" id="1_uivx3"]
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_vhl00"]
[ext_resource type="Script" path="res://scripts/trigger.gd" id="3_2qbah"]
[ext_resource type="PackedScene" uid="uid://b75mow511wmmb" path="res://scenes/player.tscn" id="3_8h5jv"]
[ext_resource type="PackedScene" uid="uid://dwfife67i1fmr" path="res://scenes/bullet.tscn" id="5_7yfvg"]
[ext_resource type="Script" path="res://scripts/scenemanager.gd" id="6_n2kp0"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1cyeq"]
size = Vector2(101, 20)
@@ -57,5 +59,12 @@ metadata/_edit_group_ = true
shape = SubResource("CircleShape2D_mfh1j")
debug_color = Color(0.825765, 0.00158581, 0.954354, 0.42)
[node name="Area2D2" parent="." instance=ExtResource("5_7yfvg")]
position = Vector2(309, 222)
[node name="SceneManager" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("6_n2kp0")
[connection signal="areaTrigger" from="Area2D" to="." method="_on_trigger"]
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
+7 -1
View File
@@ -4,7 +4,7 @@
[sub_resource type="CircleShape2D" id="CircleShape2D_i8a0m"]
[node name="CharacterBody2D" type="CharacterBody2D"]
[node name="CharacterBody2D" type="CharacterBody2D" groups=["player"]]
script = ExtResource("1_racyk")
metadata/_edit_group_ = true
@@ -17,3 +17,9 @@ target_position = Vector2(25, 0)
[node name="LeftRay" type="RayCast2D" parent="."]
target_position = Vector2(-25, 0)
[node name="RightTarget" type="Node2D" parent="."]
position = Vector2(10, -5)
[node name="LeftTarget" type="Node2D" parent="."]
position = Vector2(-10, -5)