End of Chapter 3. Loading scene and new game button working!
This commit is contained in:
16
scripts/ui/loading_screen.gd
Normal file
16
scripts/ui/loading_screen.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
extends Control
|
||||
|
||||
@export var loadingBar: TextureProgressBar
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
Loader.LOADING_PROGRESS_UPDATED.connect(_on_progress_updated)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_progress_updated(percentage: float) -> void:
|
||||
loadingBar.value = percentage
|
||||
1
scripts/ui/loading_screen.gd.uid
Normal file
1
scripts/ui/loading_screen.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d1ag1ag2bbhtx
|
||||
Reference in New Issue
Block a user