-
Notifications
You must be signed in to change notification settings - Fork 11
/
main.tscn
185 lines (137 loc) · 4.75 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
[gd_scene load_steps=10 format=1]
[ext_resource path="res://main.gd" type="Script" id=1]
[ext_resource path="res://assets/knight/knight.tscn" type="PackedScene" id=2]
[ext_resource path="res://assets/bg/bg_2.png" type="Texture" id=3]
[ext_resource path="res://assets/icons/restart.png" type="Texture" id=4]
[ext_resource path="res://assets/icons/attack.png" type="Texture" id=5]
[ext_resource path="res://assets/icons/attack_cool.png" type="Texture" id=6]
[ext_resource path="res://assets/icons/jump.png" type="Texture" id=7]
[ext_resource path="res://assets/fonts/amaranth_32_black.fnt" type="BitmapFont" id=8]
[ext_resource path="res://assets/misc/life.tscn" type="PackedScene" id=9]
[node name="main" type="Node2D"]
script/script = ExtResource( 1 )
[node name="knight" parent="." instance=ExtResource( 2 )]
transform/pos = Vector2( 128, 300 )
[node name="random_tile" type="Timer" parent="."]
process_mode = 1
wait_time = 1.7
one_shot = false
autostart = true
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
layer = -1
offset = Vector2( 0, 0 )
rotation = 0.0
scale = Vector2( 1, 1 )
scroll/offset = Vector2( 0, 0 )
scroll/base_offset = Vector2( 0, 0 )
scroll/base_scale = Vector2( 1, 1 )
scroll/limit_begin = Vector2( 0, 0 )
scroll/limit_end = Vector2( 0, 0 )
scroll/ignore_camera_zoom = true
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
motion/scale = Vector2( 0, 0 )
motion/offset = Vector2( 0, 0 )
motion/mirroring = Vector2( 1450, 0 )
[node name="bg" type="Sprite" parent="ParallaxBackground/ParallaxLayer"]
transform/pos = Vector2( 640, 360 )
z/z = -999
texture = ExtResource( 3 )
[node name="gui" type="CanvasLayer" parent="."]
layer = 1
offset = Vector2( 0, 0 )
rotation = 0.0
scale = Vector2( 1, 1 )
[node name="restart" type="TextureButton" parent="gui"]
focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 14.0
margin/top = 11.0
margin/right = 80.0
margin/bottom = 61.0
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
textures/normal = ExtResource( 4 )
[node name="attack" type="TextureButton" parent="gui"]
focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 1112.0
margin/top = 552.0
margin/right = 1240.0
margin/bottom = 680.0
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
textures/normal = ExtResource( 5 )
textures/disabled = ExtResource( 6 )
[node name="jump" type="TextureButton" parent="gui"]
focus/ignore_mouse = false
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 2
margin/left = 40.0
margin/top = 552.0
margin/right = 168.0
margin/bottom = 680.0
toggle_mode = false
click_on_press = true
enabled_focus_mode = 2
shortcut = null
textures/normal = ExtResource( 7 )
[node name="coins" type="Label" parent="gui"]
focus/ignore_mouse = true
focus/stop_mouse = true
size_flags/horizontal = 2
size_flags/vertical = 0
margin/left = 1146.0
margin/top = 12.0
margin/right = 1261.0
margin/bottom = 85.0
custom_fonts/font = ExtResource( 8 )
text = "0"
align = 2
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="lifes" type="Node" parent="gui"]
[node name="life" parent="gui/lifes" instance=ExtResource( 9 )]
transform/pos = Vector2( 128, 32 )
[node name="random_sword" type="Timer" parent="."]
process_mode = 1
wait_time = 5.0
one_shot = false
autostart = false
[node name="activate_zombies" type="Timer" parent="."]
process_mode = 1
wait_time = 15.0
one_shot = true
autostart = true
[node name="activate_spikes" type="Timer" parent="."]
process_mode = 1
wait_time = 30.0
one_shot = true
autostart = true
[node name="activate_swords" type="Timer" parent="."]
process_mode = 1
wait_time = 45.0
one_shot = true
autostart = true
[node name="restart" type="Timer" parent="."]
process_mode = 1
wait_time = 2.0
one_shot = true
autostart = false
[connection signal="timeout" from="random_tile" to="." method="_on_random_tile_timeout"]
[connection signal="pressed" from="gui/restart" to="." method="_on_restart_pressed"]
[connection signal="button_down" from="gui/attack" to="knight" method="_on_attack_button_down"]
[connection signal="button_down" from="gui/jump" to="knight" method="_on_jump_button_down"]
[connection signal="button_up" from="gui/jump" to="knight" method="_on_jump_button_up"]
[connection signal="timeout" from="random_sword" to="." method="_on_random_enemy_timeout"]
[connection signal="timeout" from="activate_zombies" to="." method="_on_activate_zombies_timeout"]
[connection signal="timeout" from="activate_spikes" to="." method="_on_activate_spikes_timeout"]
[connection signal="timeout" from="activate_swords" to="." method="_on_activate_swords_timeout"]
[connection signal="timeout" from="restart" to="." method="_on_restart_timeout"]