bullet factory, push attack

This commit is contained in:
KevinGorman committed 2025-03-03 20:41:41 -05:00
1 parent b5e5db7ef1
commit de7312cf8e
7 files changed
+272 -63

No files matched your search

+92 -61
View File
@@ -1,57 +1,26 @@
[gd_scene load_steps=9 format=3 uid="uid://c7psh8jpkkc6x"]
[gd_scene load_steps=10 format=3 uid="uid://c7psh8jpkkc6x"]
[ext_resource type="Script" path="res://scripts/game controller.gd" id="1_pcysq"]
[ext_resource type="Script" path="res://scripts/trigger.gd" id="1_tp4vr"]
[ext_resource type="Script" path="res://scripts/Player.gd" id="2_o8d6o"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nynyi"]
size = Vector2(96, 20)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_gv8hf"]
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_ukrrp"]
[ext_resource type="PackedScene" uid="uid://b0d1gs2knc2l8" path="res://scenes/player.tscn" id="3_70p4h"]
[ext_resource type="PackedScene" uid="uid://dg6vhq7diydcj" path="res://scenes/bullet.tscn" id="4_vo7vc"]
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="5_w3sh3"]
[sub_resource type="CircleShape2D" id="CircleShape2D_785vb"]
radius = 88.1419
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_wfabo"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nynyi"]
size = Vector2(96, 20)
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_ukrrp"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_gv8hf"]
[node name="AhmedGG" type="Node2D"]
script = ExtResource("1_pcysq")
[node name="StaticBody2D" type="StaticBody2D" parent="."]
position = Vector2(296, 246)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="RigidBody2D" type="RigidBody2D" parent="."]
position = Vector2(307, 34)
rotation = 0.785398
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="RigidBody2D2" type="RigidBody2D" parent="."]
position = Vector2(247, 100)
rotation = 1.33752
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D2"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="StaticBody2D2" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D2"]
position = Vector2(295, 431)
shape = SubResource("WorldBoundaryShape2D_ukrrp")
[node name="Trigger" type="Area2D" parent="."]
position = Vector2(387, 339)
position = Vector2(400, 339)
script = ExtResource("1_tp4vr")
metadata/_edit_group_ = true
@@ -59,37 +28,99 @@ metadata/_edit_group_ = true
shape = SubResource("CircleShape2D_785vb")
debug_color = Color(0.489643, 0.4608, 0.929032, 0.42)
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
position = Vector2(279, 68)
script = ExtResource("2_o8d6o")
[node name="level" type="Node2D" parent="."]
[node name="StaticBody2D" type="StaticBody2D" parent="level"]
position = Vector2(296, 246)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
shape = SubResource("CapsuleShape2D_wfabo")
debug_color = Color(0.416871, 0.601139, 0.192736, 0.42)
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="StaticBody2D3" type="StaticBody2D" parent="."]
position = Vector2(388, 223)
[node name="StaticBody2D2" type="StaticBody2D" parent="level"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D2"]
position = Vector2(295, 431)
shape = SubResource("WorldBoundaryShape2D_ukrrp")
[node name="StaticBody2D3" type="StaticBody2D" parent="level"]
position = Vector2(394, 228)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D3"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D3"]
rotation = -0.412146
shape = SubResource("RectangleShape2D_nynyi")
[node name="StaticBody2D4" type="StaticBody2D" parent="level"]
position = Vector2(109, 358)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D4"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="StaticBody2D5" type="StaticBody2D" parent="level"]
position = Vector2(182, 299)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D5"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="StaticBody2D6" type="StaticBody2D" parent="level"]
position = Vector2(161, 225)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D6"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="crates" type="Node2D" parent="."]
[node name="RigidBody2D" type="RigidBody2D" parent="crates"]
position = Vector2(307, 34)
rotation = 0.785398
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="RigidBody2D2" type="RigidBody2D" parent="crates"]
position = Vector2(247, 100)
rotation = 1.33752
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D2"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="RigidBody2D3" type="RigidBody2D" parent="crates"]
position = Vector2(355, 185)
rotation = 2.67504
scale = Vector2(1, 1)
shape = SubResource("RectangleShape2D_nynyi")
[node name="StaticBody2D4" type="StaticBody2D" parent="."]
position = Vector2(180, 364)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D4"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D3"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="StaticBody2D5" type="StaticBody2D" parent="."]
position = Vector2(235, 291)
[node name="RigidBody2D4" type="RigidBody2D" parent="crates"]
position = Vector2(138.409, 137.33)
rotation = -0.933105
scale = Vector2(1, 1)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D5"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D4"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="CharacterBody2D" parent="." instance=ExtResource("3_70p4h")]
position = Vector2(407, 65)
[node name="Area2D" parent="." instance=ExtResource("4_vo7vc")]
position = Vector2(-95, 221)
[node name="SceneManager" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("5_w3sh3")
[connection signal="areatrigger" from="Trigger" to="." method="_on_trigger_areatrigger"]
[connection signal="body_entered" from="Trigger" to="Trigger" method="_on_body_entered"]
+15
View File
@@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://dg6vhq7diydcj"]
[ext_resource type="Script" path="res://bullet.gd" id="1_oufr4"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5fful"]
size = Vector2(8, 2)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_oufr4")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_5fful")
debug_color = Color(0.900724, 0.259856, 0.444017, 0.42)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+39
View File
@@ -0,0 +1,39 @@
[gd_scene load_steps=4 format=3 uid="uid://b0d1gs2knc2l8"]
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_rdo8w"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_wfabo"]
[sub_resource type="GDScript" id="GDScript_46ryu"]
script/source = "extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
"
[node name="CharacterBody2D" type="CharacterBody2D"]
script = ExtResource("1_rdo8w")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_wfabo")
debug_color = Color(0.416871, 0.601139, 0.192736, 0.42)
[node name="right_RayCast2D" type="RayCast2D" parent="."]
target_position = Vector2(27, 0)
[node name="left_RayCast2D" type="RayCast2D" parent="."]
target_position = Vector2(-27, 0)
[node name="rightTarget_Node2D" type="Node2D" parent="."]
position = Vector2(21, -20)
[node name="leftTarget_Node2D" type="Node2D" parent="."]
position = Vector2(15, -20)
script = SubResource("GDScript_46ryu")