Spawn crates and leave in broken state

This commit is contained in:
winniewk committed 2024-07-29 21:07:47 -04:00
1 parent 386ab393c9
commit f2241640ae
19 files changed
+301 -27

No files matched your search

+50 -1
View File
@@ -1,10 +1,11 @@
[gd_scene load_steps=10 format=3 uid="uid://y083suj12rld"]
[gd_scene load_steps=14 format=3 uid="uid://y083suj12rld"]
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_77wyw"]
[ext_resource type="PackedScene" uid="uid://go4yc8hfo1gq" path="res://scenes/character.tscn" id="2_64ccm"]
[ext_resource type="Texture2D" uid="uid://dwb83f7uoweuy" path="res://graphics/Terrain (32x32).png" id="2_l22q1"]
[ext_resource type="Script" path="res://scripts/Trigger.gd" id="2_nfj1w"]
[ext_resource type="PackedScene" uid="uid://ukuu7p7vhlq" path="res://scenes/crate.tscn" id="5_u8rgi"]
[ext_resource type="PackedScene" uid="uid://c5w3e6gjovcvk" path="res://scenes/platform.tscn" id="6_0ewk8"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_xg6qs"]
texture = ExtResource("2_l22q1")
@@ -481,6 +482,43 @@ sources/0 = SubResource("TileSetAtlasSource_xg6qs")
[sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"]
radius = 60.2993
[sub_resource type="Animation" id="Animation_qecmg"]
resource_name = "move"
loop_mode = 2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(100, 0)]
}
[sub_resource type="Animation" id="Animation_spruu"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_3nvvt"]
_data = {
"RESET": SubResource("Animation_spruu"),
"move": SubResource("Animation_qecmg")
}
[node name="Game" type="Node2D"]
script = ExtResource("1_77wyw")
@@ -518,5 +556,16 @@ debug_color = Color(0.556863, 0.415686, 0.964706, 0.419608)
[node name="crate1" parent="crates" instance=ExtResource("5_u8rgi")]
position = Vector2(114, 30)
[node name="Platform" parent="." instance=ExtResource("6_0ewk8")]
[node name="AnimationPlayer" type="AnimationPlayer" parent="Platform"]
libraries = {
"": SubResource("AnimationLibrary_3nvvt")
}
autoplay = "move"
[node name="BoxTrap" type="Node2D" parent="."]
position = Vector2(273, -87)
[connection signal="areatrigger" from="AreaTrigger" to="." method="_on_area_2d_areatrigger"]
[connection signal="body_entered" from="AreaTrigger" to="AreaTrigger" method="_on_body_entered"]
+10
View File
@@ -0,0 +1,10 @@
[gd_scene load_steps=2 format=3 uid="uid://c5w3e6gjovcvk"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jbmil"]
size = Vector2(188, 14)
[node name="AnimatableBody2D" type="AnimatableBody2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_jbmil")
one_way_collision = true