Preload all textures

This commit is contained in:
2024-05-12 12:48:21 +01:00
parent 286d70e19c
commit 057cb42efe
13 changed files with 73 additions and 49 deletions

View File

@@ -160,7 +160,7 @@ func new_level() -> void:
BestTimeNode.text = format_time(Global.get_best_time(level_data.name))
StartTitleNode.text = level
StartRoundNode.text = "ROUND %3d" % [chr]
BackgroundNode.texture = load("res://Backgrounds/%s.png" % level_data.background)
BackgroundNode.texture = Global.Backgrounds.get(level_data.background, null)
BackgroundNode.modulate = Color("#%s" % level_data.get("tint", "FFFFFF"))
load_level(level_data.data)
var ball = _Ball.instantiate()