From f37f2af66524e9155be29d9915ae4835bcf70512 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Sun, 20 Mar 2022 19:58:37 -0400 Subject: [PATCH] oops forgot a small thing includes example using a fan club sound --- Assets/Scripts/Games/FanClub/FanClub.cs | 8 ++++---- Assets/Scripts/Util/MultiSound.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Games/FanClub/FanClub.cs b/Assets/Scripts/Games/FanClub/FanClub.cs index 39b939861..c5c433444 100644 --- a/Assets/Scripts/Games/FanClub/FanClub.cs +++ b/Assets/Scripts/Games/FanClub/FanClub.cs @@ -306,8 +306,8 @@ namespace HeavenStudio.Games if (!noSound) MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("fanClub/arisa_ka_jp", beat), - new MultiSound.Sound("fanClub/arisa_mo_jp", beat + 0.5f), - new MultiSound.Sound("fanClub/arisa_ne_jp", beat + 1f), + new MultiSound.Sound("fanClub/arisa_mo_jp", beat + 0.5f, offset: 0.07407407f), + new MultiSound.Sound("fanClub/arisa_ne_jp", beat + 1f, offset: 0.07407407f), }); responseToggle = true; @@ -355,8 +355,8 @@ namespace HeavenStudio.Games if (noSound) return; MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("fanClub/arisa_ka_jp", beat), - new MultiSound.Sound("fanClub/arisa_mo_jp", beat + 0.5f), - new MultiSound.Sound("fanClub/arisa_ne_jp", beat + 1f), + new MultiSound.Sound("fanClub/arisa_mo_jp", beat + 0.5f, offset: 0.07407407f), + new MultiSound.Sound("fanClub/arisa_ne_jp", beat + 1f, offset: 0.07407407f), }, forcePlay:true); } diff --git a/Assets/Scripts/Util/MultiSound.cs b/Assets/Scripts/Util/MultiSound.cs index cf7db59a4..3b1b6cda6 100644 --- a/Assets/Scripts/Util/MultiSound.cs +++ b/Assets/Scripts/Util/MultiSound.cs @@ -58,9 +58,9 @@ namespace HeavenStudio.Util if (songPositionInBeats >= sounds[i].beat - Conductor.instance.GetRestFromRealTime(sounds[i].offset) && index == i) { if (game) - Jukebox.PlayOneShotGame(sounds[i].name, sounds[i].beat, sounds[i].pitch, sounds[i].volume, sounds[i].looping, forcePlay); + Jukebox.PlayOneShotGame(sounds[i].name, sounds[i].beat - Conductor.instance.GetRestFromRealTime(sounds[i].offset), sounds[i].pitch, sounds[i].volume, sounds[i].looping, forcePlay); else - Jukebox.PlayOneShot(sounds[i].name, sounds[i].beat, sounds[i].pitch, sounds[i].volume, sounds[i].looping); + Jukebox.PlayOneShot(sounds[i].name, sounds[i].beat - Conductor.instance.GetRestFromRealTime(sounds[i].offset), sounds[i].pitch, sounds[i].volume, sounds[i].looping); index++; }