bullet factory, push attack

This commit is contained in:
OddlyTimbot committed 2025-03-03 20:40:21 -05:00
1 parent 7eca676464
commit 1ed49408f6
7 files changed
+249 -81

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://b1jq6yi0dh3c0"]
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_okq17"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_va0yp"]
size = Vector2(10, 4)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_okq17")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_va0yp")
debug_color = Color(0.952024, 0.180224, 0.327437, 0.42)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+87 -80
View File
@@ -1,8 +1,15 @@
[gd_scene load_steps=9 format=3 uid="uid://bt6uaac8wfn8k"]
[gd_scene load_steps=10 format=3 uid="uid://bt6uaac8wfn8k"]
[ext_resource type="Script" path="res://scripts/trigger.gd" id="1_8ewqq"]
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_wwyby"]
[ext_resource type="Script" path="res://scripts/player.gd" id="2_j20wl"]
[ext_resource type="PackedScene" uid="uid://cjvyslsoa7olc" path="res://scenes/player.tscn" id="3_771dm"]
[ext_resource type="PackedScene" uid="uid://b1jq6yi0dh3c0" path="res://scenes/bullet.tscn" id="4_a2pol"]
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="5_xhw0f"]
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_gmy8j"]
[sub_resource type="CircleShape2D" id="CircleShape2D_civmy"]
radius = 21.0238
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ggdp1"]
size = Vector2(72, 20)
@@ -10,81 +17,9 @@ size = Vector2(72, 20)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0u5k2"]
size = Vector2(34, 36)
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_gmy8j"]
[sub_resource type="CircleShape2D" id="CircleShape2D_civmy"]
radius = 21.0238
[sub_resource type="CircleShape2D" id="CircleShape2D_q23dn"]
[node name="Game" type="Node2D"]
script = ExtResource("1_wwyby")
[node name="Brick" type="StaticBody2D" parent="."]
position = Vector2(598, 444)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Brick"]
shape = SubResource("RectangleShape2D_ggdp1")
[node name="Brick4" type="StaticBody2D" parent="."]
position = Vector2(802, 440)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Brick4"]
shape = SubResource("RectangleShape2D_ggdp1")
[node name="Brick3" type="StaticBody2D" parent="."]
position = Vector2(706, 421)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Brick3"]
shape = SubResource("RectangleShape2D_ggdp1")
[node name="Brick2" type="StaticBody2D" parent="."]
position = Vector2(832, 195)
rotation = -0.802851
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Brick2"]
shape = SubResource("RectangleShape2D_ggdp1")
[node name="crate1" type="RigidBody2D" parent="."]
position = Vector2(446, 462)
rotation = -0.516507
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crate1"]
shape = SubResource("RectangleShape2D_0u5k2")
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
[node name="crate3" type="RigidBody2D" parent="."]
position = Vector2(376, 466)
rotation = -0.516507
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crate3"]
shape = SubResource("RectangleShape2D_0u5k2")
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
[node name="crate2" type="RigidBody2D" parent="."]
position = Vector2(920, 473)
rotation = -1.2792
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crate2"]
shape = SubResource("RectangleShape2D_0u5k2")
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
[node name="crate4" type="RigidBody2D" parent="."]
position = Vector2(868, 476)
rotation = -1.2792
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crate4"]
shape = SubResource("RectangleShape2D_0u5k2")
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
[node name="StaticBody2D" type="StaticBody2D" parent="."]
position = Vector2(601, 500)
metadata/_edit_group_ = true
@@ -101,14 +36,86 @@ metadata/_edit_group_ = true
shape = SubResource("CircleShape2D_civmy")
debug_color = Color(0.611909, 0.392035, 0.935088, 0.42)
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
position = Vector2(568, 381)
script = ExtResource("2_j20wl")
[node name="level" type="Node2D" parent="."]
[node name="Brick" type="StaticBody2D" parent="level"]
position = Vector2(598, 444)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
shape = SubResource("CircleShape2D_q23dn")
debug_color = Color(0.273614, 0.618219, 0.385754, 0.42)
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/Brick"]
shape = SubResource("RectangleShape2D_ggdp1")
[node name="Brick4" type="StaticBody2D" parent="level"]
position = Vector2(802, 440)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/Brick4"]
shape = SubResource("RectangleShape2D_ggdp1")
[node name="Brick3" type="StaticBody2D" parent="level"]
position = Vector2(706, 421)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/Brick3"]
shape = SubResource("RectangleShape2D_ggdp1")
[node name="Brick2" type="StaticBody2D" parent="level"]
position = Vector2(832, 195)
rotation = -0.802851
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/Brick2"]
shape = SubResource("RectangleShape2D_ggdp1")
[node name="crates" type="Node2D" parent="."]
[node name="crate1" type="RigidBody2D" parent="crates"]
position = Vector2(446, 462)
rotation = -0.516507
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate1"]
shape = SubResource("RectangleShape2D_0u5k2")
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
[node name="crate3" type="RigidBody2D" parent="crates"]
position = Vector2(376, 466)
rotation = -0.516507
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate3"]
shape = SubResource("RectangleShape2D_0u5k2")
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
[node name="crate2" type="RigidBody2D" parent="crates"]
position = Vector2(920, 473)
rotation = -1.2792
scale = Vector2(1, 1)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate2"]
shape = SubResource("RectangleShape2D_0u5k2")
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
[node name="crate4" type="RigidBody2D" parent="crates"]
position = Vector2(868, 476)
rotation = -1.2792
scale = Vector2(1, 1)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/crate4"]
shape = SubResource("RectangleShape2D_0u5k2")
debug_color = Color(0.868673, 0.347634, 0.15033, 0.42)
[node name="CharacterBody2D" parent="." instance=ExtResource("3_771dm")]
position = Vector2(461, 282)
[node name="Area2D" parent="." instance=ExtResource("4_a2pol")]
position = Vector2(284, 341)
[node name="SceneManager" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("5_xhw0f")
[connection signal="areaTrigger" from="Trigger" to="." method="_on_trigger_area_trigger"]
[connection signal="body_entered" from="Trigger" to="Trigger" method="_on_body_entered"]
+25
View File
@@ -0,0 +1,25 @@
[gd_scene load_steps=3 format=3 uid="uid://cjvyslsoa7olc"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_ffdhb"]
[sub_resource type="CircleShape2D" id="CircleShape2D_q23dn"]
[node name="CharacterBody2D" type="CharacterBody2D"]
script = ExtResource("1_ffdhb")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_q23dn")
debug_color = Color(0.273614, 0.618219, 0.385754, 0.42)
[node name="rightCast" type="RayCast2D" parent="."]
target_position = Vector2(16, 0)
[node name="leftCast" type="RayCast2D" parent="."]
target_position = Vector2(-16, 0)
[node name="rightTarget" type="Node2D" parent="."]
position = Vector2(18, -15)
[node name="leftTarget" type="Node2D" parent="."]
position = Vector2(-19, -15)