-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdoor.tscn
167 lines (126 loc) · 4.13 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
[gd_scene load_steps=10 format=1]
[ext_resource path="res://door.gd" type="Script" id=1]
[ext_resource path="res://tilesets/door_right.png" type="Texture" id=2]
[ext_resource path="res://tilesets/door_right_open.png" type="Texture" id=3]
[ext_resource path="res://hudfont.fnt" type="BitmapFont" id=4]
[sub_resource type="ConvexPolygonShape2D" id=1]
custom_solver_bias = 0.0
points = Vector2Array( -8.8, 2.8, 7.2, 2.8, 7.2, 18.8, -8.8, 18.8 )
[sub_resource type="ConvexPolygonShape2D" id=2]
custom_solver_bias = 0.0
points = Vector2Array( -8.8, -11.2, -8.8, 34.8, -12.8, 34.8, -12.8, -11.2 )
[sub_resource type="OccluderPolygon2D" id=3]
closed = true
cull_mode = 0
polygon = Vector2Array( -8, -16, 8, -16 )
[sub_resource type="OccluderPolygon2D" id=4]
closed = true
cull_mode = 0
polygon = Vector2Array( -8, -16, -8, 30 )
[sub_resource type="ConvexPolygonShape2D" id=5]
custom_solver_bias = 0.0
points = Vector2Array( -18, -4, 8, -4, 8, 24, -18, 24 )
[node name="door" type="Node2D" groups=[ "door" ]]
script/script = ExtResource( 1 )
__meta__ = { "_edit_group_":true }
[node name="Closed" type="Sprite" parent="."]
texture = ExtResource( 2 )
offset = Vector2( 0, 16 )
[node name="Open" type="Sprite" parent="."]
visibility/visible = false
transform/pos = Vector2( -4, 0 )
texture = ExtResource( 3 )
offset = Vector2( 0, 24 )
[node name="ClosedBody" type="StaticBody2D" parent="."]
transform/pos = Vector2( 0, 16 )
input/pickable = false
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0.799999, -2.8 )
shapes/0/trigger = false
collision/layers = 1
collision/mask = 1
constant_linear_velocity = Vector2( 0, 0 )
constant_angular_velocity = 0.0
friction = 1.0
bounce = 0.0
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ClosedBody"]
transform/pos = Vector2( 0.799999, -2.8 )
build_mode = 0
polygon = Vector2Array( -8.8, 18.8, 7.2, 18.8, 7.2, 2.8, -8.8, 2.8 )
shape_range = Vector2( 0, 0 )
trigger = false
[node name="OpenBody" type="StaticBody2D" parent="."]
transform/pos = Vector2( 0, 16 )
input/pickable = false
shapes/0/shape = SubResource( 2 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0.799999, -2.8 )
shapes/0/trigger = false
collision/layers = 2
collision/mask = 2
constant_linear_velocity = Vector2( 0, 0 )
constant_angular_velocity = 0.0
friction = 1.0
bounce = 0.0
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="OpenBody"]
transform/pos = Vector2( 0.799999, -2.8 )
build_mode = 0
polygon = Vector2Array( -12.8, -11.2, -12.8, 34.8, -8.8, 34.8, -8.8, -11.2 )
shape_range = Vector2( 0, 0 )
trigger = false
[node name="ClosedOcclud" type="LightOccluder2D" parent="."]
transform/pos = Vector2( 0, 16 )
occluder = SubResource( 3 )
light_mask = 1
[node name="OpenOcclud" type="LightOccluder2D" parent="."]
transform/pos = Vector2( 0, 16 )
occluder = SubResource( 4 )
light_mask = 2
[node name="InteractArea" type="Area2D" parent="."]
transform/pos = Vector2( 0, 16 )
input/pickable = true
shapes/0/shape = SubResource( 5 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="InteractArea"]
build_mode = 0
polygon = Vector2Array( -18, -4, 8, -4, 8, 24, -18, 24 )
shape_range = Vector2( 0, 0 )
trigger = false
[node name="HUD" type="CanvasLayer" parent="."]
layer = 1
offset = Vector2( 0, 0 )
rotation = 0.0
scale = Vector2( 1, 1 )
[node name="CenterContainer" type="CenterContainer" parent="HUD"]
anchor/left = 3
anchor/top = 1
anchor/right = 3
focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 0.0
margin/top = 150.0
margin/right = 0.0
margin/bottom = 0.0
use_top_left = true
[node name="InteractLabel" type="Label" parent="HUD/CenterContainer"]
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = -192.0
margin/top = -15.0
margin/right = 192.0
margin/bottom = 15.0
custom_fonts/font = ExtResource( 4 )
text = "Press E to open/close door"
align = 1
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1