added shoving

This commit is contained in:
edgul committed 2026-04-27 21:06:17 -04:00
1 parent 808a961af3
commit 416fc6100b
12 files changed
+226 -71

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
[gd_scene format=3 uid="uid://wt8o0uyqblsv"]
[ext_resource type="Script" uid="uid://dn8v5sbqg05v3" path="res://scripts/brown_box.gd" id="1_g34fy"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_o3qty"]
[node name="brownBox" type="RigidBody2D" unique_id=143097810 groups=["destructable"]]
script = ExtResource("1_g34fy")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=274978092]
shape = SubResource("RectangleShape2D_o3qty")
debug_color = Color(0.8449452, 0.37733862, 0.08704034, 0.41960785)
+61 -39
View File
@@ -1,49 +1,26 @@
[gd_scene format=3 uid="uid://d7n4nyeox11q"]
[ext_resource type="Script" uid="uid://c6cnqclwk4lcb" path="res://scripts/game_controller.gd" id="1_bj22s"]
[ext_resource type="Script" uid="uid://dlmf1p0vfitcx" path="res://scripts/character.gd" id="1_o3qty"]
[ext_resource type="PackedScene" uid="uid://wt8o0uyqblsv" path="res://scenes/brown_box.tscn" id="2_ca7g5"]
[ext_resource type="Script" uid="uid://sj5x7sv6o6yb" path="res://scripts/scene_manager.gd" id="2_k3dxm"]
[ext_resource type="PackedScene" uid="uid://bhsvqyhsemekq" path="res://scenes/player.tscn" id="3_k3dxm"]
[ext_resource type="Script" uid="uid://gkpbb5sf4gu7" path="res://scripts/area_2d.gd" id="3_v0i7m"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_elsnr"]
size = Vector2(244, 20)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_o3qty"]
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_elsnr"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_elsnr"]
[sub_resource type="CircleShape2D" id="CircleShape2D_bj22s"]
radius = 20.880613
[sub_resource type="RectangleShape2D" id="RectangleShape2D_elsnr"]
size = Vector2(244, 20)
[node name="GameNode" type="Node2D" unique_id=2127085168]
position = Vector2(0, -1)
script = ExtResource("1_bj22s")
[node name="platform" type="StaticBody2D" parent="." unique_id=1848808292]
position = Vector2(483, 318)
constant_linear_velocity = Vector2(15, 0)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="platform" unique_id=79089169]
shape = SubResource("RectangleShape2D_elsnr")
[node name="brownBox" type="RigidBody2D" parent="." unique_id=473138492]
position = Vector2(442, 281)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="brownBox" unique_id=1978306212]
shape = SubResource("RectangleShape2D_o3qty")
debug_color = Color(0.8449452, 0.37733862, 0.08704034, 0.41960785)
[node name="yellowBox" type="RigidBody2D" parent="." unique_id=413950760]
position = Vector2(498, 276)
rotation = 1.0476488
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="yellowBox" unique_id=1759041685]
shape = SubResource("RectangleShape2D_o3qty")
debug_color = Color(0.70038986, 0.49176556, 0.052423634, 0.41960785)
[node name="SceneManager" type="Node2D" parent="." unique_id=1765894074]
unique_name_in_owner = true
script = ExtResource("2_k3dxm")
[node name="worldFloor" type="StaticBody2D" parent="." unique_id=376228153]
position = Vector2(446, 437)
@@ -52,14 +29,8 @@ metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="worldFloor" unique_id=1759461926]
shape = SubResource("WorldBoundaryShape2D_elsnr")
[node name="character" type="CharacterBody2D" parent="." unique_id=1476507768]
[node name="player" parent="." unique_id=395957349 instance=ExtResource("3_k3dxm")]
position = Vector2(555, 272)
script = ExtResource("1_o3qty")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="character" unique_id=130782569]
shape = SubResource("CapsuleShape2D_elsnr")
debug_color = Color(0.33339813, 0.6108008, 0.35667416, 0.41960785)
[node name="area" type="Area2D" parent="." unique_id=2033836703]
position = Vector2(638, 351)
@@ -70,5 +41,56 @@ metadata/_edit_group_ = true
shape = SubResource("CircleShape2D_bj22s")
debug_color = Color(0.37550476, 0.5048963, 0.9171919, 0.41960785)
[node name="crates" type="Node2D" parent="." unique_id=1870478446]
[node name="brownBox" parent="crates" unique_id=143097810 instance=ExtResource("2_ca7g5")]
position = Vector2(409, 222)
[node name="brownBox2" parent="crates" unique_id=1038663129 instance=ExtResource("2_ca7g5")]
position = Vector2(436, 166)
[node name="brownBox4" parent="crates" unique_id=1193856484 instance=ExtResource("2_ca7g5")]
position = Vector2(472, 211)
[node name="brownBox5" parent="crates" unique_id=2032058715 instance=ExtResource("2_ca7g5")]
position = Vector2(460, 104)
[node name="brownBox3" parent="crates" unique_id=170891935 instance=ExtResource("2_ca7g5")]
position = Vector2(498, 155)
[node name="platforms" type="Node2D" parent="." unique_id=637172238]
[node name="platform" type="StaticBody2D" parent="platforms" unique_id=1848808292]
position = Vector2(483, 318)
constant_linear_velocity = Vector2(15, 0)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="platforms/platform" unique_id=79089169]
shape = SubResource("RectangleShape2D_elsnr")
[node name="platform2" type="StaticBody2D" parent="platforms" unique_id=4214019]
position = Vector2(759, 245)
constant_linear_velocity = Vector2(15, 0)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="platforms/platform2" unique_id=200788977]
shape = SubResource("RectangleShape2D_elsnr")
[node name="platform3" type="StaticBody2D" parent="platforms" unique_id=786694827]
position = Vector2(1007, 178)
constant_linear_velocity = Vector2(15, 0)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="platforms/platform3" unique_id=1451698215]
shape = SubResource("RectangleShape2D_elsnr")
[node name="platform4" type="StaticBody2D" parent="platforms" unique_id=298215616]
position = Vector2(219, 383)
constant_linear_velocity = Vector2(15, 0)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="platforms/platform4" unique_id=1906028968]
shape = SubResource("RectangleShape2D_elsnr")
[connection signal="body_entered" from="area" to="area" method="_on_body_entered"]
[connection signal="triggerActiveSignal" from="area" to="." method="_on_area_2d_trigger_active_signal"]
+19
View File
@@ -0,0 +1,19 @@
[gd_scene format=3 uid="uid://bhsvqyhsemekq"]
[ext_resource type="Script" uid="uid://dlmf1p0vfitcx" path="res://scripts/player.gd" id="1_3vyb7"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_elsnr"]
[node name="player" type="CharacterBody2D" unique_id=395957349]
script = ExtResource("1_3vyb7")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=2113735481]
shape = SubResource("CapsuleShape2D_elsnr")
debug_color = Color(0.33339813, 0.6108008, 0.35667416, 0.41960785)
[node name="raycastRight" type="RayCast2D" parent="." unique_id=1050681815]
target_position = Vector2(20, 0)
[node name="raycastLeft" type="RayCast2D" parent="." unique_id=1511802462]
target_position = Vector2(-20, 0)