From 8a0223f07b39de5991190094587ff2477d293614 Mon Sep 17 00:00:00 2001 From: FoxSpellCaster Date: Fri, 10 Jan 2025 22:13:19 -0500 Subject: [PATCH] Lesson 11 --- Physics/Crate.tscn | 18 ++++++++++++++++++ Physics/Physics.tscn | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Physics/Crate.tscn diff --git a/Physics/Crate.tscn b/Physics/Crate.tscn new file mode 100644 index 0000000..e6a2be2 --- /dev/null +++ b/Physics/Crate.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=3 format=3 uid="uid://dmsornuuqyfhd"] + +[ext_resource type="Texture2D" uid="uid://kekglgglqd17" path="res://Physics/Crate.png" id="1_72488"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_hfrgb"] +size = Vector2(18, 18) + +[node name="Crate" type="RigidBody2D"] +gravity_scale = 0.0 +linear_damp = 3.0 + +[node name="Spirte" type="Sprite2D" parent="."] +position = Vector2(-71, 0) +texture = ExtResource("1_72488") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(-71, 0) +shape = SubResource("RectangleShape2D_hfrgb") diff --git a/Physics/Physics.tscn b/Physics/Physics.tscn index 27cfd89..e8f036f 100644 --- a/Physics/Physics.tscn +++ b/Physics/Physics.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=4 format=3 uid="uid://ynpyx1a6qtoq"] +[gd_scene load_steps=5 format=3 uid="uid://ynpyx1a6qtoq"] [ext_resource type="Texture2D" uid="uid://fxeb0j820f47" path="res://Physics/PhysicsCharacter.png" id="1_8qjul"] [ext_resource type="Script" uid="uid://c5pwbg75g5n8q" path="res://Physics/PhysicsPlayer.gd" id="1_ry666"] +[ext_resource type="PackedScene" uid="uid://dmsornuuqyfhd" path="res://Physics/Crate.tscn" id="3_eghp1"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_8qjul"] size = Vector2(18, 18) @@ -22,3 +23,5 @@ shape = SubResource("RectangleShape2D_8qjul") [node name="Camera2D" type="Camera2D" parent="."] zoom = Vector2(4, 4) + +[node name="Crate" parent="." instance=ExtResource("3_eghp1")]