Added music credits

This commit is contained in:
Paul Black 2023-03-11 18:50:43 -07:00
parent 0cf127acec
commit f25ff53327
6 changed files with 81 additions and 0 deletions

View file

@ -154,3 +154,27 @@ offset_bottom = 593.0
theme_override_fonts/font = ExtResource("3_x1wqt")
theme_override_font_sizes/font_size = 29
horizontal_alignment = 1
[node name="musicPanel" type="Panel" parent="."]
layout_mode = 0
offset_left = 889.0
offset_top = 548.0
offset_right = 1146.0
offset_bottom = 644.0
[node name="playingLabel" type="Label" parent="musicPanel"]
layout_mode = 0
offset_left = 4.0
offset_top = 14.0
offset_right = 253.0
offset_bottom = 40.0
text = "Now playing: "
horizontal_alignment = 1
[node name="authorLabel" type="Label" parent="musicPanel"]
layout_mode = 0
offset_left = 7.0
offset_top = 58.0
offset_right = 252.0
offset_bottom = 81.0
horizontal_alignment = 1

View file

@ -134,6 +134,30 @@ texture = ExtResource("10_oafyi")
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("11_6irkm")
[node name="musicPanel" type="Panel" parent="."]
visible = false
offset_left = 9.0
offset_top = 327.0
offset_right = 266.0
offset_bottom = 423.0
[node name="playingLabel" type="Label" parent="musicPanel"]
layout_mode = 0
offset_left = 4.0
offset_top = 14.0
offset_right = 253.0
offset_bottom = 40.0
text = "Now playing: "
horizontal_alignment = 1
[node name="authorLabel" type="Label" parent="musicPanel"]
layout_mode = 0
offset_left = 7.0
offset_top = 58.0
offset_right = 252.0
offset_bottom = 81.0
horizontal_alignment = 1
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
[connection signal="mouse_entered" from="playButton" to="." method="_on_play_button_mouse_entered"]
[connection signal="mouse_exited" from="playButton" to="." method="_on_play_button_mouse_exited"]

View file

@ -17,6 +17,13 @@ func _process(delta):
$startLabel.text = Global.HUDStartLabelText
$Fatigue.value = Global.fatigue
$Health.value = Global.playerHealth
if Global.musicUpdated == true:
Global.musicUpdated = false
$musicPanel/playingLabel.text = Global.musicName
$musicPanel/authorLabel.text = Global.musicAuthor
$musicPanel.visible = true
await get_tree().create_timer(3).timeout
$musicPanel.visible = false
if Global.roundInSession == true and roundTimer >= 0:
if scoresInitalized == false:
scoresInitalized = true

View file

@ -25,6 +25,9 @@ var lastPersonToHitMe = 0 # Defined in the Bullet RPC
var HUDPlayerDied = false # Tells the HUD.gd script that a point should be added or deducted
var connectedPlayers = [] # Currently connected players by their name (NOT THEIR ID)
var respawnTimeModifier = 1.0 # Affects how quickly the player respawns in death.gd
var musicName = "" # Name of music for HUD.gd
var musicAuthor = "" # Name of music author for HUD.gd
var musicUpdated = false # Tells HUD.gd to update labels and change visibility
func _process(delta):
if godMode:

View file

@ -1,6 +1,8 @@
extends Control
var mainMenuScene = "res://scenes/mainmenu.tscn"
var musicName = "Fall From Grace"
var musicAuthor = "Darren Curtis"
func _ready():
if Global.playingGame == true:
@ -12,6 +14,11 @@ func _ready():
$AudioStreamPlayer.playing = false
if Global.playingGame == false:
Global.connectedPlayers = []
$musicPanel.visible = true
$musicPanel/playingLabel.text = musicName
$musicPanel/authorLabel.text = musicAuthor
await get_tree().create_timer(3).timeout
$musicPanel.visible = false
func _process(delta):
if Global.playingGame == false:

View file

@ -15,20 +15,36 @@ func _process(delta):
var randomnum = RandomNumberGenerator.new().randi_range(0, 6)
if randomnum == 0:
play_music(load("res://music/alexander-nakarada-chase.mp3"))
Global.musicName = "Chase"
Global.musicAuthor = "Alexander Nakarada"
elif randomnum == 1:
play_music(load("res://music/DRIVE.mp3"))
Global.musicName = "DRIVE"
Global.musicAuthor = "Alex-Productions"
elif randomnum == 2:
play_music(load("res://music/Fluffing-a-Duck.mp3"))
Global.musicName = "Fluffing a Duck"
Global.musicAuthor = "Kevin MacLeod"
elif randomnum == 3:
play_music(load("res://music/Monkeys-Spinning-Monkeys.mp3"))
Global.musicName = "Monkeys Spinning Monkeys"
Global.musicAuthor = "Kevin MacLeod"
elif randomnum == 4:
play_music(load("res://music/Run-Amok.mp3"))
Global.musicName = "Run Amok"
Global.musicAuthor = "Kevin MacLeod"
elif randomnum == 5:
play_music(load("res://music/Sneaky-Snitch.mp3"))
Global.musicName = "Sneaky Snitch"
Global.musicAuthor = "Kevin MacLeod"
elif randomnum == 6:
play_music(load("res://music/Wallpaper.mp3"))
Global.musicName = "Wallpaper"
Global.musicAuthor = "Kevin MacLeod"
else:
print("This shouldn't ever be called, toyland.gd")
Global.musicUpdated = true
print("hehe")
func play_music(music):