Skip to content

Commit

Permalink
Added starting sound
Browse files Browse the repository at this point in the history
  • Loading branch information
Sampleeeee committed Jul 9, 2021
1 parent de3a6f6 commit a1cb571
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/Rounds/Preparing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ private void FindNewMurderer()

protected override void OnStart()
{
Client.All.ToList().ForEach( x => (x.Pawn as MurderPlayer)?.Respawn() );

Game.RespawnEnabled = false;

FindNewDetective();
Expand All @@ -61,6 +63,7 @@ protected override void OnStart()

BlackScreen.ShowTitle( to, "You are a bystander", Color.White );
BlackScreen.ShowDescription( to, "There is a murderer on the loose. Do not die.", Color.White );
BlackScreen.PlaySound( To.Everyone, "round.start" );
}

protected override void OnTimeUp()
Expand Down
6 changes: 6 additions & 0 deletions code/UserInterface/BlackScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,11 @@ public static void HideScreen()
{
Current.Hide();
}

[ClientRpc]
public static void PlaySound( string sound )
{
Sound.FromEntity( sound, Local.Pawn );
}
}
}
10 changes: 10 additions & 0 deletions sounds/murder/round.start.sound
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->
{
data =
{
sounds =
[
"sounds/murder/town_child_scream1.vsnd",
]
}
}
Binary file added sounds/murder/round.start.sound_c
Binary file not shown.
Binary file added sounds/murder/town_child_scream1.vsnd_c
Binary file not shown.
Binary file added sounds/murder/town_child_scream1.wav
Binary file not shown.

0 comments on commit a1cb571

Please sign in to comment.