Сцена для интерактивных объектов
This commit is contained in:
parent
42db203fca
commit
cf7f3bee5b
2 changed files with 66 additions and 0 deletions
24
prefabs/Interactable.tscn
Normal file
24
prefabs/Interactable.tscn
Normal file
|
@ -0,0 +1,24 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://x6pqolxtgwvy"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Interactable.cs" id="1_4jn0u"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://bvnfvjn7am8tc" path="res://resources/sprites/key.tres" id="2_meac6"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_w4p6k"]
|
||||
|
||||
[node name="Interactable" type="Node2D"]
|
||||
script = ExtResource("1_4jn0u")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
shape = SubResource("CircleShape2D_w4p6k")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
visible = false
|
||||
sprite_frames = ExtResource("2_meac6")
|
||||
autoplay = "default"
|
||||
frame = 1
|
||||
frame_progress = 0.336703
|
||||
|
||||
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
|
||||
[connection signal="body_exited" from="Area2D" to="." method="_on_area_2d_body_exited"]
|
Loading…
Add table
Add a link
Reference in a new issue