ajout de la traduction #70
* Fix de l'inspection de l'inventaire * Suppression des assets d'objectifs
This commit is contained in:
28
stages/intro/scripts/intro.gd
Normal file
28
stages/intro/scripts/intro.gd
Normal file
@@ -0,0 +1,28 @@
|
||||
extends Node
|
||||
class_name Intro
|
||||
|
||||
var steps : Array[IntroStep]
|
||||
@export_file var game_scene_path : String
|
||||
|
||||
func _ready():
|
||||
for c in get_children():
|
||||
if c is IntroStep:
|
||||
steps.append(c)
|
||||
c.hide()
|
||||
|
||||
for i in range(len(steps)):
|
||||
steps[i].step_over.connect(
|
||||
func():
|
||||
change_step(i+1)
|
||||
)
|
||||
|
||||
change_step(0)
|
||||
|
||||
func change_step(nb):
|
||||
if nb >= len(steps):
|
||||
get_tree().change_scene_to_file(game_scene_path)
|
||||
for i in range(len(steps)):
|
||||
if i == nb:
|
||||
steps[i].show()
|
||||
else :
|
||||
steps[i].hide()
|
||||
1
stages/intro/scripts/intro.gd.uid
Normal file
1
stages/intro/scripts/intro.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ddf3fktoer2ng
|
||||
5
stages/intro/scripts/intro_step.gd
Normal file
5
stages/intro/scripts/intro_step.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
extends CanvasLayer
|
||||
class_name IntroStep
|
||||
|
||||
signal step_over
|
||||
|
||||
1
stages/intro/scripts/intro_step.gd.uid
Normal file
1
stages/intro/scripts/intro_step.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c25snxxc5jdmp
|
||||
19
stages/intro/scripts/intro_step_language.gd
Normal file
19
stages/intro/scripts/intro_step_language.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
extends IntroStep
|
||||
class_name IntroStepLanguage
|
||||
|
||||
const DEFAULT_THEME = preload("res://gui/ressources/default_theme.tres")
|
||||
|
||||
func _ready():
|
||||
for i in range(len(SettingsData.AVAILABLE_LANGUAGES)):
|
||||
var button = Button.new()
|
||||
button.theme = DEFAULT_THEME
|
||||
button.text = SettingsData.AVAILABLE_LANGUAGES_LABEL[i]
|
||||
button.pressed.connect(
|
||||
func (): choose_language(SettingsData.AVAILABLE_LANGUAGES[i])
|
||||
)
|
||||
|
||||
%LanguageButtonsContainer.add_child(button)
|
||||
|
||||
func choose_language(language_code):
|
||||
TranslationServer.set_locale(language_code)
|
||||
step_over.emit()
|
||||
1
stages/intro/scripts/intro_step_language.gd.uid
Normal file
1
stages/intro/scripts/intro_step_language.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bel0lb7kd8bf6
|
||||
5
stages/intro/scripts/intro_step_story.gd
Normal file
5
stages/intro/scripts/intro_step_story.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
extends IntroStep
|
||||
class_name IntroStepStory
|
||||
|
||||
func _on_button_pressed():
|
||||
step_over.emit()
|
||||
1
stages/intro/scripts/intro_step_story.gd.uid
Normal file
1
stages/intro/scripts/intro_step_story.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d2wapgm313xhr
|
||||
Reference in New Issue
Block a user