static bodies, rigidbodies, characterbody, area2d, timer

This commit is contained in:
OddlyTimbot committed 2025-04-07 21:00:21 -04:00
commit 3b578ac9ca
10 files changed
+259

No files matched your search

+97
View File
@@ -0,0 +1,97 @@
[gd_scene load_steps=8 format=3 uid="uid://cwuxdg5c8ylmp"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_8x5qb"]
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_wj22x"]
[ext_resource type="PackedScene" uid="uid://clf5mhteceas4" path="res://scenes/trigger.tscn" id="3_jlag1"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ryu2m"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_um86g"]
size = Vector2(55.5, 41)
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_16wxc"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_gk4xx"]
[node name="Game" type="Node2D"]
script = ExtResource("1_wj22x")
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
position = Vector2(471, 287)
script = ExtResource("1_8x5qb")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
shape = SubResource("CircleShape2D_ryu2m")
debug_color = Color(0.287381, 0.616681, 0.378827, 0.42)
[node name="level" type="Node2D" parent="."]
[node name="StaticBody2D" type="StaticBody2D" parent="level"]
position = Vector2(461, 335)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D"]
position = Vector2(-0.75, 10.5)
shape = SubResource("RectangleShape2D_um86g")
[node name="StaticBody2D2" type="StaticBody2D" parent="level"]
position = Vector2(520, 335)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D2"]
position = Vector2(-0.75, 10.5)
shape = SubResource("RectangleShape2D_um86g")
[node name="StaticBody2D3" type="StaticBody2D" parent="level"]
position = Vector2(586, 271)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D3"]
position = Vector2(-0.75, 10.5)
shape = SubResource("RectangleShape2D_um86g")
[node name="Floor" type="StaticBody2D" parent="level"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/Floor"]
position = Vector2(473, 428)
shape = SubResource("WorldBoundaryShape2D_16wxc")
[node name="crates" type="Node2D" parent="."]
[node name="RigidBody2D" type="RigidBody2D" parent="crates"]
position = Vector2(468, 257)
rotation = 1.13734
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D"]
shape = SubResource("RectangleShape2D_gk4xx")
debug_color = Color(0.854534, 0.360936, 0.197499, 0.42)
[node name="RigidBody2D2" type="RigidBody2D" parent="crates"]
position = Vector2(458, 227)
rotation = 0.693203
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D2"]
shape = SubResource("RectangleShape2D_gk4xx")
debug_color = Color(0.854534, 0.360936, 0.197499, 0.42)
[node name="RigidBody2D3" type="RigidBody2D" parent="crates"]
position = Vector2(451, 306)
rotation = -2.5155
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D3"]
shape = SubResource("RectangleShape2D_gk4xx")
debug_color = Color(0.854534, 0.360936, 0.197499, 0.42)
[node name="Trigger" parent="." instance=ExtResource("3_jlag1")]
position = Vector2(396, 385)
[node name="Trigger2" parent="." instance=ExtResource("3_jlag1")]
position = Vector2(638, 390)
effect = "teleport"
[connection signal="triggerFired" from="Trigger" to="." method="_on_trigger_fired"]
[connection signal="triggerFired" from="Trigger2" to="." method="_on_trigger_fired"]
+16
View File
@@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=3 uid="uid://clf5mhteceas4"]
[ext_resource type="Script" path="res://scripts/trigger.gd" id="1_blcrl"]
[sub_resource type="CircleShape2D" id="CircleShape2D_br1ha"]
radius = 29.0689
[node name="Trigger" type="Area2D"]
script = ExtResource("1_blcrl")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_br1ha")
debug_color = Color(0.806371, 0.261632, 0.80211, 0.42)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]