-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmine_sweeper.tscn
90 lines (71 loc) · 1.92 KB
/
mine_sweeper.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
[gd_scene load_steps=4 format=2]
[ext_resource path="res://minesweeper.gd" type="Script" id=1]
[ext_resource path="res://square_prototype.gd" type="Script" id=2]
[sub_resource type="GDScript" id=1]
script/source = "extends Timer
# Declare member variables here. Examples:
# var a = 2
# var b = \"text\"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_Timer_timeout():
$RichTextLabel.text = str(float($RichTextLabel.text) + 1)
if $RichTextLabel.text == \"0\":
get_parent().back()
"
[node name="SweeperGame" type="Node2D"]
script = ExtResource( 1 )
[node name="SquarePrototype" type="Button" parent="."]
visible = false
margin_left = 506.335
margin_top = 18.3348
margin_right = 518.335
margin_bottom = 38.3348
expand_icon = true
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="count" type="RichTextLabel" parent="."]
margin_left = 312.352
margin_top = 4.00452
margin_right = 352.352
margin_bottom = 44.0045
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Timer" type="Timer" parent="."]
autostart = true
script = SubResource( 1 )
[node name="RichTextLabel" type="RichTextLabel" parent="Timer"]
margin_left = 631.379
margin_top = 6.67419
margin_right = 671.379
margin_bottom = 46.6742
text = "0"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="co" type="RichTextLabel" parent="."]
margin_left = 234.932
margin_top = 9.34387
margin_right = 346.932
margin_bottom = 49.3439
text = "Mines Left"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RichTextLabel2" type="RichTextLabel" parent="."]
margin_left = 506.0
margin_top = 11.0
margin_right = 618.0
margin_bottom = 42.0
text = "time spent"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="timeout" from="Timer" to="Timer" method="_on_Timer_timeout"]