working force push, working bullets

This commit is contained in:
OddlyTimbot committed 2024-11-25 20:52:06 -05:00
1 parent 2b8c206abc
commit 7ee32c14d2
8 files changed
+174 -14

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
[sub_resource type="RectangleShape2D" id="RectangleShape2D_dbirr"]
size = Vector2(30, 32)
[node name="RigidBody2D" type="RigidBody2D" groups=["box"]]
[node name="RigidBody2D" type="RigidBody2D" groups=["box", "shootable"]]
position = Vector2(531, 339)
rotation = 2.64233
metadata/_edit_group_ = true
+16
View File
@@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=3 uid="uid://02fr3rb7e6s2"]
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_kc7iu"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_m2rb6"]
size = Vector2(11, 7)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_kc7iu")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0.5, -0.5)
shape = SubResource("RectangleShape2D_m2rb6")
debug_color = Color(0.366555, 0.610522, 0.244131, 0.42)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+26
View File
@@ -0,0 +1,26 @@
[gd_scene load_steps=3 format=3 uid="uid://cjqhmd3158nb7"]
[ext_resource type="Script" path="res://scripts/dudecontroller.gd" id="1_u27sl"]
[sub_resource type="CircleShape2D" id="CircleShape2D_pg3nc"]
radius = 18.1108
[node name="CharacterBody2D" type="CharacterBody2D" groups=["player"]]
script = ExtResource("1_u27sl")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_pg3nc")
debug_color = Color(0.178776, 0.565003, 0.825276, 0.42)
[node name="RightRay" type="RayCast2D" parent="."]
target_position = Vector2(28, 0)
[node name="LeftRay" type="RayCast2D" parent="."]
target_position = Vector2(-29, -1)
[node name="RightTarget" type="Node2D" parent="."]
position = Vector2(23, -11)
[node name="LeftTarget" type="Node2D" parent="."]
position = Vector2(-24, -10)
+12 -13
View File
@@ -1,21 +1,24 @@
[gd_scene load_steps=8 format=3 uid="uid://cmh68gsfunmwa"]
[gd_scene load_steps=9 format=3 uid="uid://cmh68gsfunmwa"]
[ext_resource type="Script" path="res://scripts/dudecontroller.gd" id="1_14xrk"]
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="1_obwxw"]
[ext_resource type="PackedScene" uid="uid://cjqhmd3158nb7" path="res://scenes/character.tscn" id="1_p32ky"]
[ext_resource type="Script" path="res://scripts/trigger.gd" id="2_tsnf5"]
[ext_resource type="PackedScene" uid="uid://dm71h7adhhf8u" path="res://scenes/box.tscn" id="3_pi0u1"]
[ext_resource type="PackedScene" uid="uid://02fr3rb7e6s2" path="res://scenes/bullet.tscn" id="4_7pxts"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rcjag"]
size = Vector2(84, 12)
[sub_resource type="CircleShape2D" id="CircleShape2D_pg3nc"]
radius = 18.1108
[sub_resource type="RectangleShape2D" id="RectangleShape2D_supj4"]
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_c5gsu"]
[node name="Game" type="Node2D"]
[node name="SceneManager" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("1_obwxw")
[node name="Platform" type="StaticBody2D" parent="."]
position = Vector2(523, 407)
metadata/_edit_group_ = true
@@ -37,14 +40,7 @@ metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform3"]
shape = SubResource("RectangleShape2D_rcjag")
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
position = Vector2(504, 382)
script = ExtResource("1_14xrk")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
shape = SubResource("CircleShape2D_pg3nc")
debug_color = Color(0.178776, 0.565003, 0.825276, 0.42)
[node name="CharacterBody2D" parent="." instance=ExtResource("1_p32ky")]
[node name="Area2D" type="Area2D" parent="."]
position = Vector2(519, 464)
@@ -72,4 +68,7 @@ metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
shape = SubResource("WorldBoundaryShape2D_c5gsu")
[node name="Area2D2" parent="." instance=ExtResource("4_7pxts")]
position = Vector2(244, 348)
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]