-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.tscn
157 lines (133 loc) · 4.17 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[gd_scene load_steps=17 format=2]
[ext_resource path="res://Assets/player.png" type="Texture" id=1]
[ext_resource path="res://tileset.tres" type="TileSet" id=2]
[ext_resource path="res://src/Player.gd" type="Script" id=3]
[ext_resource path="res://src/Game.gd" type="Script" id=4]
[ext_resource path="res://Assets/gun.png" type="Texture" id=5]
[ext_resource path="res://src/Gun.gd" type="Script" id=6]
[ext_resource path="res://Assets/fonts/Pixeltype.ttf" type="DynamicFontData" id=7]
[ext_resource path="res://Assets/audio/shoot.wav" type="AudioStream" id=8]
[ext_resource path="res://src/ComboUI.gd" type="Script" id=9]
[ext_resource path="res://Assets/music_button.png" type="Texture" id=10]
[ext_resource path="res://src/MusicButton.gd" type="Script" id=11]
[ext_resource path="res://Assets/audio/LD48.ogg" type="AudioStream" id=12]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 3.51929, 3.65002 )
[sub_resource type="DynamicFont" id=2]
size = 64
font_data = ExtResource( 7 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 10 )
region = Rect2( 0, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 10 )
region = Rect2( 16, 0, 16, 16 )
[node name="Game" type="Node2D"]
script = ExtResource( 4 )
_score_path = NodePath("UI/ScoreUI/score")
_combo_path = NodePath("UI/ComboUI")
[node name="Walls" type="TileMap" parent="."]
scale = Vector2( 4, 4 )
tile_set = ExtResource( 2 )
cell_size = Vector2( 16, 16 )
collision_layer = 2
collision_mask = 0
format = 1
[node name="Player" type="KinematicBody2D" parent="."]
position = Vector2( 298.191, 13.1195 )
scale = Vector2( 4, 4 )
collision_mask = 6
script = ExtResource( 3 )
[node name="Sprite" type="Sprite" parent="Player"]
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
shape = SubResource( 1 )
[node name="Camera2D" type="Camera2D" parent="Player"]
offset = Vector2( 0, 128 )
current = true
drag_margin_h_enabled = true
smoothing_enabled = true
smoothing_speed = 10.0
drag_margin_left = 0.1
drag_margin_top = 0.0
drag_margin_right = 0.1
drag_margin_bottom = 0.0
editor_draw_drag_margin = true
[node name="Gun" type="Sprite" parent="Player"]
texture = ExtResource( 5 )
script = ExtResource( 6 )
[node name="ShootSound" type="AudioStreamPlayer" parent="Player/Gun"]
stream = ExtResource( 8 )
volume_db = -8.0
[node name="UI" type="CanvasLayer" parent="."]
[node name="ScoreUI" type="HBoxContainer" parent="UI"]
margin_left = 671.441
margin_top = 24.3191
margin_right = 939.441
margin_bottom = 64.3191
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="UI/ScoreUI"]
margin_right = 144.0
margin_bottom = 40.0
custom_fonts/font = SubResource( 2 )
text = "score: "
__meta__ = {
"_edit_use_anchors_": false
}
[node name="score" type="Label" parent="UI/ScoreUI"]
margin_left = 148.0
margin_right = 268.0
margin_bottom = 40.0
custom_fonts/font = SubResource( 2 )
text = "50000"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ComboUI" type="HBoxContainer" parent="UI"]
margin_left = 426.0
margin_top = 98.024
margin_right = 598.0
margin_bottom = 138.024
script = ExtResource( 9 )
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="UI/ComboUI"]
margin_right = 144.0
margin_bottom = 40.0
custom_fonts/font = SubResource( 2 )
text = "Combo: "
__meta__ = {
"_edit_use_anchors_": false
}
[node name="combo" type="Label" parent="UI/ComboUI"]
margin_left = 148.0
margin_right = 172.0
margin_bottom = 40.0
custom_fonts/font = SubResource( 2 )
text = "0"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Tween" type="Tween" parent="UI/ComboUI"]
[node name="MusicButton" type="TextureButton" parent="UI"]
margin_left = 956.0
margin_top = 4.0
margin_right = 972.0
margin_bottom = 20.0
rect_scale = Vector2( 4, 4 )
toggle_mode = true
texture_normal = SubResource( 3 )
texture_pressed = SubResource( 4 )
script = ExtResource( 11 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Music" type="AudioStreamPlayer" parent="UI/MusicButton"]
stream = ExtResource( 12 )
volume_db = -9.0
[connection signal="toggled" from="UI/MusicButton" to="UI/MusicButton" method="_on_MusicButton_toggled"]