Browse Source

Added missing files for mini-game

Nabzzz 6 months ago
parent
commit
e894808313

+ 34
- 0
mini-game/scenes/decor/instructionsUI.gd View File

@@ -0,0 +1,34 @@
1
+extends Control
2
+
3
+
4
+# Declare member variables here. Examples:
5
+# var a = 2
6
+# var b = "text"
7
+
8
+var jumped = false
9
+
10
+func _wait_for_jump():
11
+	var t = Timer.new()
12
+	t.set_wait_time(0.5)
13
+	add_child(t)
14
+	t.start()
15
+	while(!jumped):
16
+		yield(t, "timeout")
17
+		if visible:
18
+			hide()
19
+		else:
20
+			show()
21
+	hide()
22
+
23
+func _input(event):
24
+	if event.is_action_pressed("ui_accept"):
25
+			jumped = true
26
+
27
+# Called when the node enters the scene tree for the first time.
28
+func _ready():
29
+	hide()
30
+
31
+
32
+func _init():
33
+	show()
34
+	_wait_for_jump()

+ 38
- 0
mini-game/scenes/decor/instructionsUI.tscn View File

@@ -0,0 +1,38 @@
1
+[gd_scene load_steps=4 format=2]
2
+
3
+[ext_resource path="res://mini-game/ressources/font/joystix/ot/joystix monospace.otf" type="DynamicFontData" id=1]
4
+[ext_resource path="res://mini-game/scenes/decor/instructionsUI.gd" type="Script" id=2]
5
+
6
+[sub_resource type="DynamicFont" id=1]
7
+size = 50
8
+outline_size = 8
9
+outline_color = Color( 0, 0, 0, 1 )
10
+font_data = ExtResource( 1 )
11
+
12
+[node name="instructionsUI" type="Control"]
13
+anchor_right = 1.0
14
+margin_left = 2.82837
15
+margin_top = 2.82837
16
+margin_right = 2.82837
17
+margin_bottom = 1082.83
18
+script = ExtResource( 2 )
19
+__meta__ = {
20
+"_edit_use_anchors_": false
21
+}
22
+
23
+[node name="MarginContainer" type="MarginContainer" parent="."]
24
+margin_left = -2.82837
25
+margin_top = 291.627
26
+margin_right = 1918.17
27
+margin_bottom = 645.627
28
+__meta__ = {
29
+"_edit_use_anchors_": false
30
+}
31
+
32
+[node name="Label" type="Label" parent="MarginContainer"]
33
+margin_top = 146.0
34
+margin_right = 1921.0
35
+margin_bottom = 207.0
36
+custom_fonts/font = SubResource( 1 )
37
+text = "Appuyer sur ESPACE pour sauter"
38
+align = 1

+ 18
- 0
mini-game/scenes/decor/start_timer_UI.gd View File

@@ -0,0 +1,18 @@
1
+extends Control
2
+
3
+
4
+onready var label : Label = $MarginContainer/Label
5
+
6
+func _ready():
7
+	Signals.connect("update_timer",self,"update_timer")
8
+	hide()
9
+	
10
+
11
+func update_timer(score: String):
12
+	label.text = score
13
+	
14
+
15
+func init():
16
+	update_timer(String(3))
17
+	show()
18
+

+ 34
- 0
mini-game/scenes/decor/start_timer_UI.tscn View File

@@ -0,0 +1,34 @@
1
+[gd_scene load_steps=4 format=2]
2
+
3
+[ext_resource path="res://mini-game/ressources/font/joystix/ot/joystix monospace.otf" type="DynamicFontData" id=1]
4
+[ext_resource path="res://mini-game/scenes/decor/start_timer_UI.gd" type="Script" id=2]
5
+
6
+[sub_resource type="DynamicFont" id=1]
7
+size = 200
8
+outline_size = 20
9
+outline_color = Color( 0, 0, 0, 1 )
10
+font_data = ExtResource( 1 )
11
+
12
+[node name="start_timer_UI" type="Control"]
13
+anchor_right = 1.0
14
+anchor_bottom = 1.0
15
+margin_right = 0.00012207
16
+script = ExtResource( 2 )
17
+__meta__ = {
18
+"_edit_use_anchors_": false
19
+}
20
+
21
+[node name="MarginContainer" type="MarginContainer" parent="."]
22
+anchor_right = 1.0
23
+margin_bottom = 370.0
24
+__meta__ = {
25
+"_edit_use_anchors_": false
26
+}
27
+
28
+[node name="Label" type="Label" parent="MarginContainer"]
29
+margin_top = 64.0
30
+margin_right = 1920.0
31
+margin_bottom = 305.0
32
+custom_fonts/font = SubResource( 1 )
33
+text = "9"
34
+align = 1

Loading…
Cancel
Save