Reaction hidden
This commit is contained in:
parent
f0ee075f7a
commit
d4b50bdda0
12 changed files with 189 additions and 12 deletions
|
|
@ -3,6 +3,7 @@ extends Node
|
|||
class_name Inventory
|
||||
|
||||
@export var open_on_top: bool
|
||||
@export var capacity: float = 10.
|
||||
var inventory: Dictionary[StringName,RuntimeSubstanceData]
|
||||
|
||||
var mean_temperature: float:
|
||||
|
|
@ -177,4 +178,4 @@ func check_for_reactions() -> void:
|
|||
recalculate_temperature()
|
||||
update_solutions()
|
||||
inventory_changed.emit(inventory.values())
|
||||
GuiSignalBus.push("Произошла реакция: " + found_reaction.formula())
|
||||
GuiSignalBus.push("Произошла реакция")
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
@tool
|
||||
extends MeshInstance3D
|
||||
|
||||
enum DisplayType{
|
||||
|
|
@ -6,6 +7,10 @@ enum DisplayType{
|
|||
}
|
||||
|
||||
@export var display_type: DisplayType
|
||||
@export_tool_button("Wiggle") var wiggle = func() -> void:
|
||||
var tween = create_tween()
|
||||
material_override.set_shader_parameter("wave_intensity",1.)
|
||||
tween.tween_property(material_override,"shader_parameter/wave_intensity",0.0,2.0)
|
||||
|
||||
func update_material(substances: Array[RuntimeSubstanceData]) -> void:
|
||||
var mat: StandardMaterial3D = material_override
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ func _on_tab_clicked(tab: int) -> void:
|
|||
GuiSignalBus.clear_table.emit()
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
var anwsered = LabRuntime.questions_anwsered()
|
||||
var anwsered = LabRuntime.test_failed()
|
||||
set_tab_disabled(0,anwsered)
|
||||
set_tab_disabled(2,anwsered)
|
||||
set_tab_disabled(3,anwsered)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,13 @@ extends Control
|
|||
var current: int = -1
|
||||
|
||||
func _ready() -> void:
|
||||
for question in LabRuntime.current_lab.tests:
|
||||
shuffle_questions()
|
||||
|
||||
func shuffle_questions() -> void:
|
||||
var questions = LabRuntime.current_lab.tests.duplicate()
|
||||
questions.shuffle()
|
||||
questions.resize(5)
|
||||
for question in questions:
|
||||
var options = question.options.duplicate()
|
||||
options.shuffle()
|
||||
var vbox = VBoxContainer.new()
|
||||
|
|
@ -20,7 +26,6 @@ func _ready() -> void:
|
|||
add_child(vbox)
|
||||
next()
|
||||
|
||||
|
||||
func _on_close_button_pressed() -> void:
|
||||
get_parent().visible = false
|
||||
|
||||
|
|
@ -30,9 +35,10 @@ func next() -> void:
|
|||
current += 1
|
||||
get_child(current).visible = true
|
||||
else:
|
||||
get_parent().visible = false
|
||||
visible = false
|
||||
$"../Result".visible = true
|
||||
LabRuntime.tries += 1
|
||||
|
||||
func anwser(option_number: int,correctness: bool):
|
||||
LabRuntime.anwsers.append(option_number)
|
||||
LabRuntime.correctness.append(correctness)
|
||||
|
||||
LabRuntime.correctness.append(correctness)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue