big four objects, 3 tiers, game controller, custom signal

This commit is contained in:
TaylorB committed 2025-07-28 21:16:32 -04:00
commit 77eb50f69e
14 files changed
+202

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
[gd_scene load_steps=8 format=3 uid="uid://ibkufgrwjwro"]
[ext_resource type="Script" uid="uid://buhkldpol3slp" path="res://scripts/gamecontroller.gd" id="1_3d84a"]
[ext_resource type="Script" uid="uid://bxlrsqltut2xn" path="res://scripts/Player.gd" id="1_r8wv2"]
[ext_resource type="PackedScene" uid="uid://4a4u47173cyb" path="res://Scenes/trigger.tscn" id="2_lptsb"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ag0er"]
size = Vector2(82, 20)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_r8wv2"]
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_ag0er"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ag0er"]
[node name="Game" type="Node2D"]
script = ExtResource("1_3d84a")
[node name="StaticBody2D" type="StaticBody2D" parent="."]
position = Vector2(113, 130)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
shape = SubResource("RectangleShape2D_ag0er")
[node name="RigidBody2D" type="RigidBody2D" parent="."]
position = Vector2(128, 41)
rotation = 0.90108
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
shape = SubResource("RectangleShape2D_r8wv2")
debug_color = Color(0.875314, 0.341029, 0.122297, 0.42)
[node name="RigidBody2D2" type="RigidBody2D" parent="."]
position = Vector2(114, -1)
rotation = 0.90108
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D2"]
shape = SubResource("RectangleShape2D_r8wv2")
debug_color = Color(0.875314, 0.341029, 0.122297, 0.42)
[node name="ground" type="StaticBody2D" parent="."]
position = Vector2(186, 270)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="ground"]
shape = SubResource("WorldBoundaryShape2D_ag0er")
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
position = Vector2(127, 108)
script = ExtResource("1_r8wv2")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
shape = SubResource("CircleShape2D_ag0er")
debug_color = Color(3.08037e-06, 0.641589, 0.331866, 0.42)
[node name="Area2D" parent="." instance=ExtResource("2_lptsb")]
position = Vector2(88, 86)
[connection signal="areaTriggerSignal" from="Area2D" to="." method="_on_trigger"]
+16
View File
@@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=3 uid="uid://4a4u47173cyb"]
[ext_resource type="Script" uid="uid://dgou0wuvr15v" path="res://scripts/trigger.gd" id="1_vcq5i"]
[sub_resource type="CircleShape2D" id="CircleShape2D_r8wv2"]
radius = 16.1245
[node name="trigger" type="Area2D"]
script = ExtResource("1_vcq5i")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_r8wv2")
debug_color = Color(0.350416, 0.00116361, 0.829529, 0.419608)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]