GAE_CA1/skripts/tutorial.gd

65 lines
1.8 KiB
GDScript

extends Node
@export var tutorial_titel: Label
@export var tutaoral_text: Label
@export var tutorial_laayer: CanvasLayer
var tutorial_step:int = 0
func start_tutorial() -> void:
Global.is_tutorial_active = true
tutorial_step = 1
show_next_tutorial_step()
func show_next_tutorial_step() -> void:
match tutorial_step:
1:
tutaoral_text.show()
tutaoral_text.text = "This is your Order - Remeber it!"
await get_tree().create_timer(2.5).timeout
tutaoral_text.hide()
## generire eine Order
var bsp_order:Array[String] = ["Apple","Light","Blue"]
Global.game_scene.game_ui.set_up_item_list(bsp_order)
await get_tree().create_timer(7.0).timeout
Global.game_scene.game_ui.hide_oder_list()
tutaoral_text.show()
tutaoral_text.text = "Now Lets start Brewing!"
await get_tree().create_timer(2.0).timeout
tutaoral_text.hide()
tutorial_step += 1
show_next_tutorial_step()
2:
Global.game_ui.display_tutorial_text("First Step - Magic Water from the Well")
tutaoral_text.show()
await get_tree().create_timer(3.0).timeout
tutaoral_text.hide()
tutorial_step += 1
show_next_tutorial_step()
3:
Global.game_ui.display_tutorial_text("Second Step - Put INgrediant in - remember the Order")
tutaoral_text.show()
await get_tree().create_timer(3.0).timeout
tutaoral_text.hide()
4:
Global.game_ui.display_tutorial_text("Second Step - Put the Ingrediants in H where to find them ")
tutaoral_text.show()
await get_tree().create_timer(3.0).timeout
tutaoral_text.hide()
5:
# Tutorial beenden und Spiel starten
Global.game_ui.display_tutorial_text("Viel Erfolg, Braumeister!")
await get_tree().create_timer(2.0).timeout
Global.is_tutorial_active = false
Global.is_first_start = false # Damit es beim nächsten Mal nicht kommt
Global.game_scene.set_up_new_round()