make hud music text dynamic

This commit is contained in:
Haze Weathers 2023-05-17 02:22:43 -04:00
parent da6a97cb70
commit caff76a99d
2 changed files with 18 additions and 29 deletions

View file

@ -13,7 +13,7 @@ onready var lives_counter = $LivesCounter
onready var high_counter = $HighCounter
onready var time_counter = $TimeCounter
export var song_name = "@Rumble"
export var song_name = "♫Music"
export (Color) var bonus_color
func _ready():
@ -24,7 +24,13 @@ func _ready():
else:
$DeathsHead.visible = true
#Change text to song name
$Music.text = song_name
var music = $Music
music.text = song_name
yield(get_tree(), "idle_frame")
var tween = create_tween()
tween.tween_property(music, "rect_position:x", 254.0 - music.rect_size.x, 1.0)
tween.tween_interval(3.0)
tween.tween_property(music, "rect_position:x", 256.0, 1.0)
func _physics_process(delta):
#Gold Counter