-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGame.tscn
142 lines (125 loc) · 7.29 KB
/
Game.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
[gd_scene load_steps=10 format=2]
[ext_resource path="res://Scripts/SnakeGame.gd" type="Script" id=1]
[ext_resource path="res://Textures/Ground.png" type="Texture" id=2]
[ext_resource path="res://Textures/MMMMMMMM.png" type="Texture" id=3]
[ext_resource path="res://611Bit.tres" type="DynamicFont" id=4]
[ext_resource path="res://Textures/Gameover.png" type="Texture" id=5]
[ext_resource path="res://SFX/soda collect.ogg" type="AudioStream" id=6]
[ext_resource path="res://SFX/hurt.ogg" type="AudioStream" id=7]
[sub_resource type="TileSet" id=1]
0/name = "Ground.png 0"
0/texture = ExtResource( 2 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 32, 32 )
0/tile_mode = 0
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shapes = [ ]
0/z_index = 0
1/name = "Ground.png 1"
1/texture = ExtResource( 2 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 32, 0, 32, 32 )
1/tile_mode = 0
1/occluder_offset = Vector2( 0, 0 )
1/navigation_offset = Vector2( 0, 0 )
1/shapes = [ ]
1/z_index = 0
2/name = "Ground.png 2"
2/texture = ExtResource( 2 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 64, 0, 32, 32 )
2/tile_mode = 0
2/occluder_offset = Vector2( 0, 0 )
2/navigation_offset = Vector2( 0, 0 )
2/shapes = [ ]
2/z_index = 0
[sub_resource type="CanvasItemMaterial" id=2]
blend_mode = 3
[node name="Snake" type="Node2D"]
script = ExtResource( 1 )
[node name="GameClock" type="Timer" parent="."]
wait_time = 0.1
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2( 256, 256 )
current = true
drag_margin_h_enabled = false
drag_margin_v_enabled = false
[node name="TileMap" type="TileMap" parent="."]
show_behind_parent = true
z_index = -5
tile_set = SubResource( 1 )
cell_size = Vector2( 32, 32 )
format = 1
tile_data = PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 65536, 0, 0, 65537, 2, 0, 65538, 1, 0, 65539, 2, 0, 65540, 1, 0, 65541, 2, 0, 65542, 1, 0, 65543, 2, 0, 65544, 1, 0, 65545, 2, 0, 65546, 1, 0, 65547, 2, 0, 65548, 1, 0, 65549, 2, 0, 65550, 1, 0, 65551, 0, 0, 131072, 0, 0, 131073, 1, 0, 131074, 2, 0, 131075, 1, 0, 131076, 2, 0, 131077, 1, 0, 131078, 2, 0, 131079, 1, 0, 131080, 2, 0, 131081, 1, 0, 131082, 2, 0, 131083, 1, 0, 131084, 2, 0, 131085, 1, 0, 131086, 2, 0, 131087, 0, 0, 196608, 0, 0, 196609, 2, 0, 196610, 1, 0, 196611, 2, 0, 196612, 1, 0, 196613, 2, 0, 196614, 1, 0, 196615, 2, 0, 196616, 1, 0, 196617, 2, 0, 196618, 1, 0, 196619, 2, 0, 196620, 1, 0, 196621, 2, 0, 196622, 1, 0, 196623, 0, 0, 262144, 0, 0, 262145, 1, 0, 262146, 2, 0, 262147, 1, 0, 262148, 2, 0, 262149, 1, 0, 262150, 2, 0, 262151, 1, 0, 262152, 2, 0, 262153, 1, 0, 262154, 2, 0, 262155, 1, 0, 262156, 2, 0, 262157, 1, 0, 262158, 2, 0, 262159, 0, 0, 327680, 0, 0, 327681, 2, 0, 327682, 1, 0, 327683, 2, 0, 327684, 1, 0, 327685, 2, 0, 327686, 1, 0, 327687, 2, 0, 327688, 1, 0, 327689, 2, 0, 327690, 1, 0, 327691, 2, 0, 327692, 1, 0, 327693, 2, 0, 327694, 1, 0, 327695, 0, 0, 393216, 0, 0, 393217, 1, 0, 393218, 2, 0, 393219, 1, 0, 393220, 2, 0, 393221, 1, 0, 393222, 2, 0, 393223, 1, 0, 393224, 2, 0, 393225, 1, 0, 393226, 2, 0, 393227, 1, 0, 393228, 2, 0, 393229, 1, 0, 393230, 2, 0, 393231, 0, 0, 458752, 0, 0, 458753, 2, 0, 458754, 1, 0, 458755, 2, 0, 458756, 1, 0, 458757, 2, 0, 458758, 1, 0, 458759, 2, 0, 458760, 1, 0, 458761, 2, 0, 458762, 1, 0, 458763, 2, 0, 458764, 1, 0, 458765, 2, 0, 458766, 1, 0, 458767, 0, 0, 524288, 0, 0, 524289, 1, 0, 524290, 2, 0, 524291, 1, 0, 524292, 2, 0, 524293, 1, 0, 524294, 2, 0, 524295, 1, 0, 524296, 2, 0, 524297, 1, 0, 524298, 2, 0, 524299, 1, 0, 524300, 2, 0, 524301, 1, 0, 524302, 2, 0, 524303, 0, 0, 589824, 0, 0, 589825, 2, 0, 589826, 1, 0, 589827, 2, 0, 589828, 1, 0, 589829, 2, 0, 589830, 1, 0, 589831, 2, 0, 589832, 1, 0, 589833, 2, 0, 589834, 1, 0, 589835, 2, 0, 589836, 1, 0, 589837, 2, 0, 589838, 1, 0, 589839, 0, 0, 655360, 0, 0, 655361, 1, 0, 655362, 2, 0, 655363, 1, 0, 655364, 2, 0, 655365, 1, 0, 655366, 2, 0, 655367, 1, 0, 655368, 2, 0, 655369, 1, 0, 655370, 2, 0, 655371, 1, 0, 655372, 2, 0, 655373, 1, 0, 655374, 2, 0, 655375, 0, 0, 720896, 0, 0, 720897, 2, 0, 720898, 1, 0, 720899, 2, 0, 720900, 1, 0, 720901, 2, 0, 720902, 1, 0, 720903, 2, 0, 720904, 1, 0, 720905, 2, 0, 720906, 1, 0, 720907, 2, 0, 720908, 1, 0, 720909, 2, 0, 720910, 1, 0, 720911, 0, 0, 786432, 0, 0, 786433, 1, 0, 786434, 2, 0, 786435, 1, 0, 786436, 2, 0, 786437, 1, 0, 786438, 2, 0, 786439, 1, 0, 786440, 2, 0, 786441, 1, 0, 786442, 2, 0, 786443, 1, 0, 786444, 2, 0, 786445, 1, 0, 786446, 2, 0, 786447, 0, 0, 851968, 0, 0, 851969, 2, 0, 851970, 1, 0, 851971, 2, 0, 851972, 1, 0, 851973, 2, 0, 851974, 1, 0, 851975, 2, 0, 851976, 1, 0, 851977, 2, 0, 851978, 1, 0, 851979, 2, 0, 851980, 1, 0, 851981, 2, 0, 851982, 1, 0, 851983, 0, 0, 917504, 0, 0, 917505, 1, 0, 917506, 2, 0, 917507, 1, 0, 917508, 2, 0, 917509, 1, 0, 917510, 2, 0, 917511, 1, 0, 917512, 2, 0, 917513, 1, 0, 917514, 2, 0, 917515, 1, 0, 917516, 2, 0, 917517, 1, 0, 917518, 2, 0, 917519, 0, 0, 983040, 0, 0, 983041, 0, 0, 983042, 0, 0, 983043, 0, 0, 983044, 0, 0, 983045, 0, 0, 983046, 0, 0, 983047, 0, 0, 983048, 0, 0, 983049, 0, 0, 983050, 0, 0, 983051, 0, 0, 983052, 0, 0, 983053, 0, 0, 983054, 0, 0, 983055, 0, 0 )
[node name="Boris" type="Sprite" parent="."]
visible = false
show_behind_parent = true
material = SubResource( 2 )
position = Vector2( 256, 256 )
scale = Vector2( 3.5, 3.5 )
z_index = -2
texture = ExtResource( 3 )
[node name="UI" type="CanvasLayer" parent="."]
[node name="ScoreLabel" type="Label" parent="UI"]
anchor_right = 1.0
margin_top = 8.0
custom_fonts/font = ExtResource( 4 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_x = 2
custom_constants/shadow_offset_y = 2
custom_constants/shadow_as_outline = 1
text = "Score: 0"
align = 1
[node name="GameOver" type="ColorRect" parent="UI"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -30.0
margin_top = -30.0
margin_right = 30.0
margin_bottom = 30.0
color = Color( 0, 0, 0, 0.588235 )
[node name="GameOverLabel" type="Label" parent="UI/GameOver"]
anchor_right = 1.0
margin_top = 80.0
custom_fonts/font = ExtResource( 4 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_x = 2
custom_constants/shadow_offset_y = 2
custom_constants/shadow_as_outline = 1
text = "Game Over!
Score: 0
Best: 0"
align = 1
[node name="GameOverLabel2" type="Label" parent="UI/GameOver"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_bottom = -128.0
custom_fonts/font = ExtResource( 4 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_x = 2
custom_constants/shadow_offset_y = 2
custom_constants/shadow_as_outline = 1
text = "[Restart] [Menu] [Leaderboard]"
align = 1
valign = 2
[node name="TextureRect" type="TextureRect" parent="UI/GameOver"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 16.0
texture = ExtResource( 5 )
expand = true
stretch_mode = 4
[node name="SFX" type="Node" parent="."]
[node name="SodaCollect" type="AudioStreamPlayer" parent="SFX"]
stream = ExtResource( 6 )
volume_db = -15.0
[node name="Hurt" type="AudioStreamPlayer" parent="SFX"]
stream = ExtResource( 7 )
volume_db = -15.0
[connection signal="timeout" from="GameClock" to="." method="_on_Timer_timeout"]