Skip to content
Snippets Groups Projects
Commit 7a6b9ea6 authored by prime8888's avatar prime8888
Browse files

random object and score fix

parent ee769bbe
Branches
1 merge request!8Merge partie 2
......@@ -56,6 +56,19 @@ var objets = [
]
var objet = {
"nom":'Amulette de Hongshan',
"epoque":"Néolithique",
"date":"-5500",
"ethnie":"Chinois",
"lieu":"Chine"
}
func _ready():
var rng = RandomNumberGenerator.new()
rng.randomize()
var mon_rnd = rng.randi_range(0, 5)
objet = objets[mon_rnd]
#pour l'outil analyse carbone
var taux_carbone
......
extends Panel
var obj_correcte = "qwe"
var epoque_correcte = "asd"
var date_correcte = -100
var ethnie_correcte = "zxc"
var geo_correcte = "qwe"
var obj_correcte
var epoque_correcte
var date_correcte
var ethnie_correcte
var geo_correcte
var time = 50
......@@ -15,6 +15,14 @@ onready var pb = get_node("ProgressBar")
# Called when the node enters the scene tree for the first time.
func _ready():
obj_correcte = Partie.objet["nom"]
epoque_correcte = Partie.objet["epoque"]
date_correcte = int(Partie.objet["date"])
ethnie_correcte = Partie.objet["ethnie"]
geo_correcte = Partie.objet["lieu"]
timer.set_wait_time(time)
pb.max_value = time
txt_time = " s"
......
......@@ -79,10 +79,10 @@ size = 25
use_filter = true
font_data = ExtResource( 8 )
[sub_resource type="DynamicFont" id=15]
[sub_resource type="DynamicFont" id=14]
font_data = ExtResource( 8 )
[sub_resource type="DynamicFont" id=14]
[sub_resource type="DynamicFont" id=15]
size = 14
use_filter = true
font_data = ExtResource( 8 )
......@@ -627,7 +627,7 @@ margin_left = 500.0
margin_top = 50.0
margin_right = 800.0
margin_bottom = 425.0
custom_fonts/mono_font = SubResource( 15 )
custom_fonts/mono_font = SubResource( 14 )
custom_colors/default_color = Color( 0, 0, 0, 1 )
script = ExtResource( 21 )
__meta__ = {
......@@ -639,16 +639,16 @@ margin_left = 75.0
margin_top = 400.0
margin_right = 116.001
margin_bottom = 422.0
custom_fonts/font = SubResource( 14 )
custom_fonts/font = SubResource( 15 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
script = ExtResource( 22 )
[connection signal="pressed" from="outils/VBoxContainer/carbon" to="carbon_popup" method="_on_carbon_pressed"]
[connection signal="pressed" from="outils/VBoxContainer/encyclopedie" to="encyclopedie_popup" method="_on_encyclopedie_pressed"]
[connection signal="timeout" from="annalyse/Panel/Timer" to="annalyse/Panel" method="_on_Timer_timeout"]
[connection signal="pressed" from="carbon_popup/Control/Control/exit" to="carbon_popup" method="_on_exit_pressed"]
[connection signal="pressed" from="encyclopedie_popup/Control/apres" to="encyclopedie_popup/Control/RichTextLabel" method="_on_apres_pressed"]
[connection signal="pressed" from="encyclopedie_popup/Control/apres" to="encyclopedie_popup/Control/Label" method="_on_apres_pressed"]
[connection signal="pressed" from="encyclopedie_popup/Control/apres" to="encyclopedie_popup/Control/TextureRect" method="_on_apres_pressed"]
[connection signal="pressed" from="encyclopedie_popup/Control/avant" to="encyclopedie_popup/Control/RichTextLabel" method="_on_avant_pressed"]
[connection signal="pressed" from="encyclopedie_popup/Control/apres" to="encyclopedie_popup/Control/RichTextLabel" method="_on_apres_pressed"]
[connection signal="pressed" from="encyclopedie_popup/Control/avant" to="encyclopedie_popup/Control/Label" method="_on_avant_pressed"]
[connection signal="pressed" from="encyclopedie_popup/Control/avant" to="encyclopedie_popup/Control/TextureRect" method="_on_avant_pressed"]
[connection signal="pressed" from="encyclopedie_popup/Control/avant" to="encyclopedie_popup/Control/RichTextLabel" method="_on_avant_pressed"]
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment