From 514f47c7251cff6af31b00693c617a211a57614d Mon Sep 17 00:00:00 2001 From: unfa Date: Mon, 6 Dec 2021 22:13:36 +0100 Subject: [PATCH] Implemented welcome message --- Game/Assets/Announcer/Announcer.gd | 1 + Game/Assets/HUD/HUD.gd | 2 +- Game/Main.gd | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Game/Assets/Announcer/Announcer.gd b/Game/Assets/Announcer/Announcer.gd index c7af28b..2d98aec 100644 --- a/Game/Assets/Announcer/Announcer.gd +++ b/Game/Assets/Announcer/Announcer.gd @@ -10,6 +10,7 @@ extends AudioStreamPlayer @onready var firstblood = preload("res://Assets/Announcer/FirstBlood.wav") @onready var yousuck = preload("res://Assets/Announcer/YouSuck.wav") @onready var payback = preload("res://Assets/Announcer/Payback.wav") +@onready var welcome = preload("res://Assets/Announcer/Welcome.wav") # Declare member variables here. Examples: # var a = 2 # var b = "text" diff --git a/Game/Assets/HUD/HUD.gd b/Game/Assets/HUD/HUD.gd index 2a5b967..51b5a20 100644 --- a/Game/Assets/HUD/HUD.gd +++ b/Game/Assets/HUD/HUD.gd @@ -14,7 +14,7 @@ var pain: float = 0: # Called when the node enters the scene tree for the first time. func _ready(): - pass # Replace with function body. + pass func game_over(winner): scoretab(true, winner) diff --git a/Game/Main.gd b/Game/Main.gd index 73e954f..208dfc7 100644 --- a/Game/Main.gd +++ b/Game/Main.gd @@ -499,6 +499,8 @@ func _ready() -> void: if OS.get_cmdline_args().has("--dedicated-server"): start_dedicated_server() + + $Announcer.speak($Announcer.welcome) func change_player_color(color): if get_tree().multiplayer.has_multiplayer_peer():