working force push working bullets

This commit is contained in:
konzy committed 2024-11-25 20:52:14 -05:00
1 parent 112f7ec7ee
commit c1ff1f0a01
8 files changed
+188 -17

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
[sub_resource type="RectangleShape2D" id="RectangleShape2D_c58s7"]
size = Vector2(46, 42)
[node name="RigidBody2D" type="RigidBody2D" groups=["box"]]
[node name="RigidBody2D" type="RigidBody2D" groups=["box", "shootable"]]
position = Vector2(588, 292)
rotation = 0.837162
metadata/_edit_group_ = true
+15
View File
@@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://e4o5ja1w0gph"]
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_mqe8j"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_y4ewo"]
size = Vector2(6, 2)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_mqe8j")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_y4ewo")
debug_color = Color(0.341018, 0.620642, 0.0617414, 0.42)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+27
View File
@@ -0,0 +1,27 @@
[gd_scene load_steps=3 format=3 uid="uid://b6vk2imhuhv0j"]
[ext_resource type="Script" path="res://scripts/dudecontroller.gd" id="1_esbkk"]
[sub_resource type="CircleShape2D" id="CircleShape2D_drde1"]
radius = 23.0
[node name="CharacterBody2D" type="CharacterBody2D" groups=["player"]]
script = ExtResource("1_esbkk")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = -0.0421956
shape = SubResource("CircleShape2D_drde1")
debug_color = Color(0.459127, 0.454101, 0.981072, 0.42)
[node name="RightRay" type="RayCast2D" parent="."]
target_position = Vector2(36, 0)
[node name="LeftRay" type="RayCast2D" parent="."]
target_position = Vector2(-36, 0)
[node name="RightTarget" type="Node2D" parent="."]
position = Vector2(23, -16)
[node name="LeftTarget" type="Node2D" parent="."]
position = Vector2(-23, -16)
+13 -15
View File
@@ -1,21 +1,24 @@
[gd_scene load_steps=8 format=3 uid="uid://dmk3hbsrqhgad"]
[gd_scene load_steps=9 format=3 uid="uid://dmk3hbsrqhgad"]
[ext_resource type="PackedScene" uid="uid://flumvyk8tafw" path="res://scenes/box.tscn" id="1_ixp3c"]
[ext_resource type="Script" path="res://scripts/dudecontroller.gd" id="1_pin1i"]
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="1_sylse"]
[ext_resource type="PackedScene" uid="uid://b6vk2imhuhv0j" path="res://scenes/character.tscn" id="1_umdfo"]
[ext_resource type="Script" path="res://scripts/trigger.gd" id="2_e4xab"]
[ext_resource type="PackedScene" uid="uid://e4o5ja1w0gph" path="res://scenes/bullet.tscn" id="4_7436f"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mhewf"]
size = Vector2(102, 12)
[sub_resource type="CircleShape2D" id="CircleShape2D_drde1"]
radius = 23.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0jo0r"]
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_jsnkw"]
[node name="Game" type="Node2D"]
[node name="SceneManager" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("1_sylse")
[node name="Platform" type="StaticBody2D" parent="."]
position = Vector2(584, 454)
metadata/_edit_group_ = true
@@ -51,15 +54,7 @@ metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform5"]
shape = SubResource("RectangleShape2D_mhewf")
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
position = Vector2(589, 426)
script = ExtResource("1_pin1i")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
rotation = -0.0421956
shape = SubResource("CircleShape2D_drde1")
debug_color = Color(0.459127, 0.454101, 0.981072, 0.42)
[node name="CharacterBody2D" parent="." instance=ExtResource("1_umdfo")]
[node name="Area2D" type="Area2D" parent="."]
position = Vector2(576, 533)
@@ -72,7 +67,7 @@ shape = SubResource("RectangleShape2D_0jo0r")
debug_color = Color(0.774214, 0.233911, 0.917118, 0.42)
[node name="RigidBody2D" parent="." instance=ExtResource("1_ixp3c")]
position = Vector2(627, 304)
position = Vector2(699, 304)
[node name="RigidBody2D2" parent="." instance=ExtResource("1_ixp3c")]
position = Vector2(586, 229)
@@ -87,4 +82,7 @@ metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
shape = SubResource("WorldBoundaryShape2D_jsnkw")
[node name="Area2D2" parent="." instance=ExtResource("4_7436f")]
position = Vector2(207, 491)
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]