This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tscn
134 lines (107 loc) · 3.19 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
[gd_scene load_steps=10 format=2]
[ext_resource path="res://tilemap/ground_tilemap.tres" type="TileSet" id=1]
[ext_resource path="res://tilemap/props_tilemap.tres" type="TileSet" id=2]
[ext_resource path="res://nodes/ground/ground.gd" type="Script" id=3]
[ext_resource path="res://nodes/props/props.gd" type="Script" id=4]
[ext_resource path="res://nodes/screeneffects/screeneffects.gd" type="Script" id=5]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.0980392, 0.0980392, 0.0980392, 1 )
border_width_left = 5
border_width_top = 5
border_width_right = 5
border_width_bottom = 5
border_color = Color( 0.505882, 0, 0, 1 )
expand_margin_left = 5.0
expand_margin_right = 5.0
expand_margin_top = 5.0
expand_margin_bottom = 5.0
[sub_resource type="GDScript" id=2]
script/source = "extends Label
func _ready():
Main.connect(\"fire_spread\",self,\"destroy\")
func destroy(_position : Vector2) -> void:
queue_free()
"
[sub_resource type="StyleBoxFlat" id=4]
bg_color = Color( 0.192157, 0.192157, 0.192157, 1 )
border_width_left = 4
border_width_top = 4
border_width_right = 4
border_width_bottom = 4
border_color = Color( 0.94902, 0.470588, 0, 1 )
expand_margin_left = 5.0
expand_margin_right = 5.0
expand_margin_top = 5.0
expand_margin_bottom = 5.0
[sub_resource type="GDScript" id=3]
script/source = "extends Label
export(String) var msg := \"😄😄😄😄Tiles burnt: \"
var count : int = 0
func _ready():
Main.connect(\"burnt\",self,\"new_tile\")
func new_tile(_position : Vector2) -> void:
count += 1
text = msg + String(count)
"
[node name="Main2D" type="Node2D"]
[node name="Overlay" type="CanvasLayer" parent="."]
[node name="ClickToStart" type="Label" parent="Overlay"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -77.0
margin_top = -12.0
margin_right = 77.0
margin_bottom = 12.0
custom_styles/normal = SubResource( 1 )
text = "click to start a fire"
uppercase = true
script = SubResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BurntTilesCounter" type="Label" parent="Overlay"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -58.0
margin_right = 58.0
margin_bottom = 22.0
custom_styles/normal = SubResource( 4 )
text = "Tiles burnt: 0000"
align = 1
script = SubResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
msg = "Tiles burnt: "
[node name="Ground" type="TileMap" parent="."]
tile_set = ExtResource( 1 )
cell_size = Vector2( 8, 8 )
format = 1
script = ExtResource( 3 )
__meta__ = {
"_edit_lock_": true
}
[node name="RespawnTimer" type="Timer" parent="Ground"]
[node name="Props" type="TileMap" parent="."]
tile_set = ExtResource( 2 )
cell_size = Vector2( 16, 16 )
cell_y_sort = true
format = 1
script = ExtResource( 4 )
__meta__ = {
"_edit_lock_": true
}
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2( 512, 304 )
current = true
[node name="ScreenEffects" type="CanvasModulate" parent="."]
script = ExtResource( 5 )
__meta__ = {
"_edit_lock_": true
}
[node name="StartTimer" type="Timer" parent="."]
one_shot = true
[connection signal="timeout" from="Ground/RespawnTimer" to="Ground" method="_on_RespawnTimer_timeout"]
[connection signal="timeout" from="StartTimer" to="Ground" method="_on_StartTimer_timeout"]