-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.tscn
184 lines (150 loc) · 5.47 KB
/
main.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
[gd_scene load_steps=13 format=2]
[ext_resource path="res://scripts/Gameplay.gd" type="Script" id=1]
[ext_resource path="res://scripts/Camera.gd" type="Script" id=2]
[ext_resource path="res://scripts/Shadow.gd" type="Script" id=3]
[ext_resource path="res://wall.tscn" type="PackedScene" id=4]
[ext_resource path="res://player.tscn" type="PackedScene" id=5]
[sub_resource type="Environment" id=1]
background_mode = 4
[sub_resource type="Gradient" id=2]
colors = PoolColorArray( 0, 0, 0, 0.780392, 0, 0, 0, 0.913725 )
[sub_resource type="GradientTexture" id=3]
gradient = SubResource( 2 )
width = 128
[sub_resource type="CanvasItemMaterial" id=4]
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 0.5, 0.5 )
[sub_resource type="Animation" id=6]
resource_name = "game_start"
length = 5.0
tracks/0/type = "value"
tracks/0/path = NodePath("shadow:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 4 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("game/obstacles:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.5, 2.2 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("game/greeting:modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
[sub_resource type="Animation" id=7]
resource_name = "greeting_blink"
length = 4.0
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("game/greeting/Label:custom_colors/font_color")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 2, 3.9 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 0, 0, 1 ), Color( 0.4, 0.4, 0.4, 1 ), Color( 1, 0, 0, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("game/greeting/activate:color")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 2, 3.9 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 0.517647, 0.0745098, 0.0745098, 1 ), Color( 0.376471, 0.376471, 0.376471, 1 ), Color( 0.517647, 0.0745098, 0.0745098, 1 ) ]
}
[node name="root" type="Node2D"]
script = ExtResource( 1 )
[node name="environment" type="WorldEnvironment" parent="."]
environment = SubResource( 1 )
[node name="camera" type="Sprite" parent="."]
position = Vector2( 320, 240 )
region_enabled = true
script = ExtResource( 2 )
[node name="shadow" type="Sprite" parent="."]
modulate = Color( 1, 1, 1, 0 )
position = Vector2( 320, 240 )
rotation = -1.57079
scale = Vector2( 4.36585, 669.43 )
texture = SubResource( 3 )
script = ExtResource( 3 )
[node name="game" type="Node2D" parent="."]
[node name="obstacles" type="Node2D" parent="game"]
modulate = Color( 1, 1, 1, 0 )
[node name="walls" type="StaticBody2D" parent="game/obstacles"]
[node name="left" type="CollisionShape2D" parent="game/obstacles/walls"]
material = SubResource( 4 )
position = Vector2( -25, 240 )
scale = Vector2( 50, 580 )
shape = SubResource( 5 )
[node name="right" type="CollisionShape2D" parent="game/obstacles/walls"]
position = Vector2( 665, 240 )
scale = Vector2( 50, 580 )
shape = SubResource( 5 )
[node name="top" type="CollisionShape2D" parent="game/obstacles/walls"]
position = Vector2( 320, -25 )
scale = Vector2( 740, 50 )
shape = SubResource( 5 )
[node name="bottom" type="CollisionShape2D" parent="game/obstacles/walls"]
position = Vector2( 320, 505 )
scale = Vector2( 740, 50 )
shape = SubResource( 5 )
[node name="box1" parent="game/obstacles" instance=ExtResource( 4 )]
position = Vector2( 200, 240 )
scale = Vector2( 4.32, 4.6 )
[node name="box2" parent="game/obstacles" instance=ExtResource( 4 )]
position = Vector2( 429.587, 241.227 )
scale = Vector2( 4.32, 4.6 )
[node name="player" parent="game" instance=ExtResource( 5 )]
[node name="greeting" type="Node2D" parent="game"]
[node name="Label" type="Label" parent="game/greeting"]
margin_left = -21.1647
margin_top = 81.3666
margin_right = 520.835
margin_bottom = 169.367
rect_scale = Vector2( 1.26726, 1.26726 )
custom_colors/font_color = Color( 0.774305, 0.150464, 0.150464, 1 )
text = "Place your head in rectangle to start the game"
align = 1
[node name="activate" type="Polygon2D" parent="game/greeting"]
position = Vector2( 320, 240 )
color = Color( 0.464542, 0.188095, 0.188095, 1 )
invert_enable = true
invert_border = 10.0
polygon = PoolVector2Array( -60, -60, 60, -60, 60, 60, -60, 60 )
[node name="animation" type="AnimationPlayer" parent="."]
anims/game_start = SubResource( 6 )
anims/greeting_blink = SubResource( 7 )
[connection signal="camera_frame" from="." to="camera" method="_on_root_camera_frame"]
[connection signal="camera_ready" from="." to="camera" method="_on_root_camera_ready"]
[connection signal="force" from="." to="game/player" method="_on_root_force"]
[connection signal="game_start" from="." to="game/player" method="_on_root_game_start"]
[connection signal="game_start" from="." to="shadow" method="_on_root_game_start"]