58 lines
2 KiB
Text
58 lines
2 KiB
Text
|
[gd_scene load_steps=12 format=2]
|
||
|
|
||
|
[ext_resource path="res://objects/door/assets/door1.svg" type="Texture" id=1]
|
||
|
[ext_resource path="res://objects/door/assets/door4.svg" type="Texture" id=2]
|
||
|
[ext_resource path="res://objects/door/assets/door2.svg" type="Texture" id=3]
|
||
|
[ext_resource path="res://objects/door/assets/door5.svg" type="Texture" id=4]
|
||
|
[ext_resource path="res://objects/door/assets/door3.svg" type="Texture" id=5]
|
||
|
[ext_resource path="res://objects/door/door.gd" type="Script" id=6]
|
||
|
[ext_resource path="res://objects/door/assets/locked.ogg" type="AudioStream" id=7]
|
||
|
[ext_resource path="res://objects/door/assets/open.ogg" type="AudioStream" id=8]
|
||
|
|
||
|
[sub_resource type="SpriteFrames" id=1]
|
||
|
animations = [ {
|
||
|
"frames": [ ExtResource( 1 ), ExtResource( 3 ), ExtResource( 5 ), ExtResource( 2 ), ExtResource( 4 ) ],
|
||
|
"loop": false,
|
||
|
"name": "open",
|
||
|
"speed": 10.0
|
||
|
} ]
|
||
|
|
||
|
[sub_resource type="RectangleShape2D" id=2]
|
||
|
extents = Vector2( 5.5, 59.75 )
|
||
|
|
||
|
[sub_resource type="RectangleShape2D" id=3]
|
||
|
extents = Vector2( 36.5, 60 )
|
||
|
|
||
|
[node name="Door" type="StaticBody2D"]
|
||
|
z_index = 20
|
||
|
collision_layer = 4
|
||
|
collision_mask = 0
|
||
|
script = ExtResource( 6 )
|
||
|
|
||
|
[node name="Sprite" type="AnimatedSprite" parent="."]
|
||
|
position = Vector2( -31, 47 )
|
||
|
frames = SubResource( 1 )
|
||
|
animation = "open"
|
||
|
|
||
|
[node name="Collision" type="CollisionShape2D" parent="."]
|
||
|
position = Vector2( -0.5, 47 )
|
||
|
shape = SubResource( 2 )
|
||
|
|
||
|
[node name="PlayerCollision" type="Area2D" parent="."]
|
||
|
collision_layer = 8
|
||
|
|
||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerCollision"]
|
||
|
position = Vector2( -0.5, 47 )
|
||
|
shape = SubResource( 3 )
|
||
|
|
||
|
[node name="AudioLocked" type="AudioStreamPlayer2D" parent="."]
|
||
|
stream = ExtResource( 7 )
|
||
|
volume_db = 10.0
|
||
|
|
||
|
[node name="AudioOpen" type="AudioStreamPlayer2D" parent="."]
|
||
|
stream = ExtResource( 8 )
|
||
|
volume_db = 10.0
|
||
|
|
||
|
[connection signal="animation_finished" from="Sprite" to="." method="_on_Sprite_animation_finished"]
|
||
|
[connection signal="body_entered" from="PlayerCollision" to="." method="_on_PlayerCollision"]
|