GMTK-2024/gmtk_2024/objects/PressurePlate.tscn
2024-08-19 03:15:07 +02:00

89 lines
2.5 KiB
Text

[gd_scene load_steps=8 format=3 uid="uid://c6g2f7tm7iasr"]
[ext_resource type="Script" path="res://scripts/PressurePlate.gd" id="1_7ar3x"]
[ext_resource type="Texture2D" uid="uid://cwf57p0osmc0w" path="res://textures/PressurePlate.png" id="1_st48m"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_c6ukx"]
size = Vector2(24, 2)
[sub_resource type="Animation" id="Animation_fulu2"]
resource_name = "Disable"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1]
}
[sub_resource type="Animation" id="Animation_xxdm0"]
resource_name = "Enable"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_7ggr5"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_usrhb"]
_data = {
"Disable": SubResource("Animation_fulu2"),
"Enable": SubResource("Animation_xxdm0"),
"RESET": SubResource("Animation_7ggr5")
}
[node name="PressurePlate" type="StaticBody2D"]
collision_layer = 32
collision_mask = 37
script = ExtResource("1_7ar3x")
[node name="Area2D" type="Area2D" parent="."]
collision_layer = 32
collision_mask = 5
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(0, 11)
shape = SubResource("RectangleShape2D_c6ukx")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
polygon = PackedVector2Array(-16, 16, -12, 12, 12, 12, 16, 16)
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_st48m")
hframes = 2
frame = 1
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_usrhb")
}
autoplay = "Enable"
[connection signal="body_entered" from="Area2D" to="." method="_on_body_entered"]
[connection signal="body_exited" from="Area2D" to="." method="_on_body_exited"]