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

@@ -55,22 +55,22 @@ func type(base : int, color : Color) -> void:
original_color = color
match base:
NORMAL:
$TextureRect.texture = load("res://Brick/BaseBrick.png")
$TextureRect.texture = Global.Bricks["base"]
$TextureRect.modulate = color
hits = 1
value = 100
SILVER:
$TextureRect.texture = load("res://Brick/ShinyBrick.png")
$TextureRect.texture = Global.Bricks["shiny"]
$TextureRect.modulate = color
hits = 2
value = 200
GOLD:
$TextureRect.texture = load("res://Brick/ShinyBrick.png")
$TextureRect.texture = Global.Bricks["shiny"]
$TextureRect.modulate = color
hits = 3
value = 500
INVULNERABLE:
$TextureRect.texture = load("res://Brick/InvulBrick.png")
$TextureRect.texture = Global.Bricks["invul"]
$TextureRect.modulate = color
hits = 2
value = 0