added popup showing currently playing song

This commit is contained in:
pennyrigate 2023-03-22 01:40:30 -04:00
parent d23567a0da
commit a5d847abfd
11 changed files with 82 additions and 1 deletions

View file

@ -13,6 +13,7 @@ onready var lives_counter = $LivesCounter
onready var high_counter = $HighCounter
onready var time_counter = $TimeCounter
export var song_name = "@Rumble"
export (Color) var bonus_color
func _ready():
@ -22,6 +23,8 @@ func _ready():
$LivesHead.visible = true
else:
$DeathsHead.visible = true
#Change text to song name
$Music.text = song_name
func _physics_process(delta):
#Gold Counter

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=11 format=2]
[gd_scene load_steps=14 format=2]
[ext_resource path="res://graphics/hud/stars_hud.png" type="Texture" id=1]
[ext_resource path="res://graphics/hud/lives_head.png" type="Texture" id=2]
@ -7,12 +7,30 @@
[ext_resource path="res://graphics/hud/gold_counter.png" type="Texture" id=5]
[ext_resource path="res://objects/hud/hud.gd" type="Script" id=6]
[ext_resource path="res://graphics/hud/key_counter.png" type="Texture" id=7]
[ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=8]
[ext_resource path="res://ui/2ndpuberty_no_dropshadow.tres" type="Theme" id=9]
[ext_resource path="res://ui/theme.tres" type="Theme" id=10]
[sub_resource type="ShaderMaterial" id=1]
[sub_resource type="ShaderMaterial" id=2]
[sub_resource type="Animation" id=3]
resource_name = "show song name"
length = 5.0
tracks/0/type = "value"
tracks/0/path = NodePath("Music:rect_position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.8, 4.2, 5 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 150, 178 ), Vector2( 57, 178 ), Vector2( 57, 178 ), Vector2( 150, 178 ) ]
}
[node name="HUD" type="CanvasLayer"]
layer = 100
script = ExtResource( 6 )
@ -145,3 +163,17 @@ margin_right = 56.0
margin_bottom = 199.0
theme = ExtResource( 10 )
text = "0:00:00"
[node name="Music" type="Label" parent="."]
material = ExtResource( 8 )
margin_left = 150.0
margin_top = 178.0
margin_right = 348.0
margin_bottom = 192.0
theme = ExtResource( 9 )
text = "@rumble"
align = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "show song name"
"anims/show song name" = SubResource( 3 )