Files
Projekt_Gry/Scripts/pisanie_tekstu_strona_start.gd
2025-10-20 19:38:20 +02:00

77 lines
2.3 KiB
GDScript

extends Control
var Pozycja = 0
var index : float = 0
var index_integer = 0
@onready var GNN_lenght = get_node ("Label/GIN").get_total_character_count()
func _ready():
# teraz chowamy niepotrzebne teksty
$Label/Nazwa_statku.hide()
$Label/Nazwa_statku.visible_characters = 0
$Label/Specyfikacja_statku.hide()
$Label/Specyfikacja_statku.visible_characters = 0
$"Label/GIN - connected".hide()
$"Label/GIN - progress bar".hide()
$"Label/GIN - progress bar".visible_characters = 0
$Label/GIN.show()
$Label/GIN.visible_characters = 0
func _process(delta):
if Pozycja == 0: # wyświetlamy tekst GNN najpierw
index += delta * 15
if index > 1:
$Label/GIN.visible_characters += 1
$"terminal beep".play()
index = 0
if $Label/GIN.visible_characters > GNN_lenght :
Pozycja += 1
GNN_lenght = get_node ("Label/GIN - progress bar").get_total_character_count()
$"Label/GIN - progress bar".show()
if Pozycja == 1: # zaczynam progress bar
index += delta * 3
if index > 1:
$"Label/GIN - progress bar".visible_characters += 1
$"terminal beep".play()
index = 0
if $"Label/GIN - progress bar".visible_characters > GNN_lenght :
Pozycja += 1
$"Label/GIN - progress bar".hide()
$"Label/GIN - connected".show()
if Pozycja == 2: # mryganie statusem connected
index += delta * 3
if index_integer > 4:
Pozycja += 1
$"Label/GIN - connected".hide()
$Label/GIN.hide()
$Label/Nazwa_statku.show()
GNN_lenght = get_node ("Label/Nazwa_statku").get_total_character_count()
if index > 1:
index = 0
if $"Label/GIN - connected".visible :
$"Label/GIN - connected".hide()
index_integer += 1
$"terminal beep".play()
else :
$"Label/GIN - connected".show()
if Pozycja == 3:
index += delta * 20
if index > 1:
index = 0
$Label/Nazwa_statku.visible_characters += 1
$"terminal beep".play()
if $Label/Nazwa_statku.visible_characters > GNN_lenght :
Pozycja += 1
GNN_lenght = get_node ("Label/Specyfikacja_statku").get_total_character_count()
$Label/Specyfikacja_statku.show()
if Pozycja == 4:
index += delta * 20
if index > 1:
index = 0
$Label/Specyfikacja_statku.visible_characters += 1
$"terminal beep".play()
if $Label/Specyfikacja_statku.visible_characters > GNN_lenght :
Pozycja += 1