working bullet factory

This commit is contained in:
GabriellePipo committed 2025-01-13 20:58:52 -05:00
1 parent 6f55d9442c
commit 8adfc2b674
9 files changed
+107 -3

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://c7v063yofnirp"]
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_au5n7"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hrjpd"]
size = Vector2(14, 6)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_au5n7")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_hrjpd")
debug_color = Color(0.92607, 0.250785, 0.273463, 0.42)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+1 -1
View File
@@ -2,7 +2,7 @@
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jflwv"]
[node name="RigidBody2D" type="RigidBody2D" groups=["box"]]
[node name="RigidBody2D" type="RigidBody2D" groups=["box", "destructable"]]
rotation = -2.29882
metadata/_edit_group_ = true
+10 -1
View File
@@ -1,9 +1,11 @@
[gd_scene load_steps=8 format=3 uid="uid://cxnmaxykhbgaq"]
[gd_scene load_steps=10 format=3 uid="uid://cxnmaxykhbgaq"]
[ext_resource type="PackedScene" uid="uid://63qb2drh1l33" path="res://scenes/crate.tscn" id="1_0wmww"]
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_5dy8j"]
[ext_resource type="Script" path="res://scripts/Trigger.gd" id="3_4laji"]
[ext_resource type="PackedScene" uid="uid://c1cuiluq1fcpk" path="res://scenes/player.tscn" id="3_w28al"]
[ext_resource type="PackedScene" uid="uid://c7v063yofnirp" path="res://scenes/bullet.tscn" id="5_drh85"]
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="6_duuox"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_f1luk"]
size = Vector2(172, 20)
@@ -52,5 +54,12 @@ debug_color = Color(0.466667, 0.592157, 0, 0.419608)
[node name="RigidBody2D3" parent="." instance=ExtResource("1_0wmww")]
position = Vector2(256, 39)
[node name="Area2D" parent="." instance=ExtResource("5_drh85")]
position = Vector2(49, 305)
[node name="SceneManager" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("6_duuox")
[connection signal="alert" from="Trigger" to="." method="_on_trigger_alert"]
[connection signal="body_entered" from="Trigger" to="Trigger" method="_on_body_entered"]
+7 -1
View File
@@ -4,7 +4,7 @@
[sub_resource type="CircleShape2D" id="CircleShape2D_y4y41"]
[node name="CharacterBody2D" type="CharacterBody2D"]
[node name="CharacterBody2D" type="CharacterBody2D" groups=["player"]]
script = ExtResource("1_s1kdl")
metadata/_edit_group_ = true
@@ -18,3 +18,9 @@ collide_with_areas = true
[node name="LeftRay" type="RayCast2D" parent="."]
target_position = Vector2(-15, 0)
[node name="RightTarget" type="Node2D" parent="."]
position = Vector2(10, -5)
[node name="LeftTarget" type="Node2D" parent="."]
position = Vector2(-10, -5)