This repository has been archived on 2020-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
odyssey-old/Actors/Objects/Door/Door.tscn

73 lines
2 KiB
Text

[gd_scene load_steps=12 format=2]
[ext_resource path="res://Actors/Objects/Door/Door.gd" type="Script" id=1]
[ext_resource path="res://Graphics/tgstation/opening-sheet.png" type="Texture" id=2]
[ext_resource path="res://Actors/Components/ActivationRange.gd" type="Script" id=3]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 2 )
region = Rect2( 0, 64, 32, 32 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 2 )
region = Rect2( 32, 32, 32, 32 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 2 )
region = Rect2( 0, 32, 32, 32 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 2 )
region = Rect2( 32, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 32, 32 )
[sub_resource type="SpriteFrames" id=6]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ],
"loop": false,
"name": "close",
"speed": 20.0
}, {
"frames": [ SubResource( 5 ), SubResource( 4 ), SubResource( 3 ), SubResource( 2 ), SubResource( 1 ) ],
"loop": false,
"name": "open",
"speed": 20.0
} ]
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 16, 16 )
[sub_resource type="CircleShape2D" id=8]
radius = 64.0
[node name="Door" type="StaticBody2D"]
input_pickable = true
script = ExtResource( 1 )
[node name="Sprite" type="AnimatedSprite" parent="."]
frames = SubResource( 6 )
animation = "close"
frame = 4
playing = true
centered = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 16, 16 )
shape = SubResource( 7 )
[node name="Timer" type="Timer" parent="."]
wait_time = 5.0
one_shot = true
[node name="ActivationRange" type="Area2D" parent="."]
visible = false
script = ExtResource( 3 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="ActivationRange"]
position = Vector2( 16, 16 )
shape = SubResource( 8 )
[connection signal="animation_finished" from="Sprite" to="." method="_animation_finished"]
[connection signal="timeout" from="Timer" to="." method="_close_timer_triggered"]