-
Notifications
You must be signed in to change notification settings - Fork 53
/
Door.tscn
99 lines (90 loc) · 2.44 KB
/
Door.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
[gd_scene load_steps=6 format=2]
[ext_resource path="res://Assets/Buildings/Door Animations/house1.png" type="Texture" id=1]
[ext_resource path="res://Door.gd" type="Script" id=2]
[sub_resource type="Animation" id=1]
resource_name = "CloseDoor"
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ 2, 1, 0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}
tracks/2/type = "method"
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.3 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "door_closed"
} ]
}
[sub_resource type="Animation" id=2]
resource_name = "OpenDoor"
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 8, 8 )
[node name="Door" type="Area2D"]
collision_layer = 8
collision_mask = 0
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
visible = false
texture = ExtResource( 1 )
centered = false
vframes = 3
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/CloseDoor = SubResource( 1 )
anims/OpenDoor = SubResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 8, 8 )
shape = SubResource( 3 )
[connection signal="body_entered" from="." to="." method="_on_Door_body_entered"]
[connection signal="body_exited" from="." to="." method="_on_Door_body_exited"]