Нажимная плита
This commit is contained in:
parent
aca884b891
commit
2e5d268f35
5 changed files with 108 additions and 4 deletions
22
prefabs/entities/pressure_plate.tscn
Normal file
22
prefabs/entities/pressure_plate.tscn
Normal file
|
@ -0,0 +1,22 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bj1ixwjdpnooo"]
|
||||
|
||||
[ext_resource type="SpriteFrames" uid="uid://chfnxa71xs3ww" path="res://sprites/tiles/floor/pressure_plate.tres" id="1_1wdq4"]
|
||||
[ext_resource type="Script" path="res://scripts/entities/PressurePlate.cs" id="1_httlb"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1jim7"]
|
||||
size = Vector2(32, 32)
|
||||
|
||||
[node name="pressure_plate" type="Area2D"]
|
||||
z_index = -1
|
||||
script = ExtResource("1_httlb")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_1jim7")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = ExtResource("1_1wdq4")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="AnimatedSprite2D"]
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_onPressed"]
|
||||
[connection signal="body_exited" from="." to="." method="_onUnpressed"]
|
Loading…
Add table
Add a link
Reference in a new issue