diff --git a/Assets/Scripts/Games/BonOdori/BonOdori.cs b/Assets/Scripts/Games/BonOdori/BonOdori.cs index 38de92bc8..1b53f3e96 100644 --- a/Assets/Scripts/Games/BonOdori/BonOdori.cs +++ b/Assets/Scripts/Games/BonOdori/BonOdori.cs @@ -48,11 +48,11 @@ namespace HeavenStudio.Games.Loaders new((x, _) => (int)x == 1, new string[] { "variationPa"}), new((x, _) => (int)x == 2, new string[] { "variationPa_n"}), }), - new Param("variationPan", BonOdori.variationPan.PanC, "Pan Type", "Set the variation of the voice line."), - new Param("variationPa", BonOdori.variationPa.PaG, "Pa Type", "Set the variation of the voice line."), - new Param("variationPa_n", BonOdori.variationPa_n.Pa_nA , "Pa-n Type", "Set the variation of the voice line."), + new Param("variationPan", new EntityTypes.NoteSampleDropdown(BonOdori.variationPan.PanC, BonOdori.GetSample, "semitone"), "Pan Type", "Set the variation of the voice line."), + new Param("variationPa", new EntityTypes.NoteSampleDropdown(BonOdori.variationPa.PaG, BonOdori.GetSample, "semitone"), "Pa Type", "Set the variation of the voice line."), + new Param("variationPa_n", new EntityTypes.NoteSampleDropdown(BonOdori.variationPa_n.Pa_nA, BonOdori.GetSample, "semitone") , "Pa-n Type", "Set the variation of the voice line."), new Param("clapType", BonOdori.typeClap.SideClap, "Clap Type", "Set the type of clap."), - new Param("semitone", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Semitone", "Set the number of semitones up or down this note should be pitched."), + new Param("semitone", new EntityTypes.Note(offsetToC: false), "Semitone", "Set the number of semitones up or down this note should be pitched."), }, }, @@ -71,10 +71,10 @@ namespace HeavenStudio.Games.Loaders new((x, _) => (int)x == 1, new string[] { "variationDo"}), new((x, _) => (int)x == 2, new string[] { "variationDo_n"}), }), - new Param("variationDon", BonOdori.variationDon.DonA, "Don Type", "Set the variation of the voice line."), - new Param("variationDo", BonOdori.variationDo.DoC, "Do Type", "Set the variation of the voice line."), - new Param("variationDo_n", BonOdori.variationDo_n.Do_nA, "Do-n Type", "Set the variation of the voice line."), - new Param("semitone", new EntityTypes.Integer(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0), "Semitone", "Set the number of semitones up or down this note should be pitched."), + new Param("variationDon", new EntityTypes.NoteSampleDropdown(BonOdori.variationDon.DonA, BonOdori.GetSample, "semitone"), "Don Type", "Set the variation of the voice line."), + new Param("variationDo", new EntityTypes.NoteSampleDropdown(BonOdori.variationDo.DoC, BonOdori.GetSample, "semitone"), "Do Type", "Set the variation of the voice line."), + new Param("variationDo_n", new EntityTypes.NoteSampleDropdown(BonOdori.variationDo_n.Do_nA, BonOdori.GetSample, "semitone"), "Do-n Type", "Set the variation of the voice line."), + new Param("semitone", new EntityTypes.Note(offsetToC: false), "Semitone", "Set the number of semitones up or down this note should be pitched."), }, }, @@ -251,6 +251,29 @@ namespace HeavenStudio.Games DoG = 1 } + public static readonly Dictionary NoteSamples = new() + { + { variationPan.PanC, new("bonOdori/pan1", 3, 4) }, + { variationPan.PanE, new("bonOdori/pan2", 7, 4) }, + { variationPan.PanA, new("bonOdori/pan3", 0, 4) }, + { variationPa_n.Pa_nA, new("bonOdori/pa_n1", 0, 4) }, + { variationPa_n.Pa_nC, new("bonOdori/pa_n2", 3, 4) }, + { variationPa.PaG, new("bonOdori/pa1", 7, 4) }, + { variationDon.DonA, new("bonOdori/don1", 0, 4) }, + { variationDon.DonD, new("bonOdori/don2", 5, 4) }, + { variationDon.DonC, new("bonOdori/don3", 3, 4) }, + { variationDon.DonG, new("bonOdori/don4", 10, 4) }, + { variationDo_n.Do_nA, new("bonOdori/do_n1", 0, 4) }, + { variationDo_n.Do_nG, new("bonOdori/do_n2", 7, 4) }, + { variationDo.DoC, new("bonOdori/do1", 3, 4) }, + { variationDo.DoG, new("bonOdori/do2", 7, 4) } + }; + + public static NoteSample GetSample(object sampleEnum) + { + return NoteSamples[sampleEnum]; + } + public static BonOdori instance { get; set; } public void Awake() diff --git a/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs b/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs index 0efebf502..91f82f213 100644 --- a/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs +++ b/Assets/Scripts/Games/ChargingChicken/ChargingChicken.cs @@ -848,7 +848,7 @@ namespace HeavenStudio.Games Conductor.instance.FadeMinigameVolume(0, 0, 1); drumTempVolume = 1; - if (isWhirringPlaying) { whirring.Stop(); isWhirringPlaying = false; } + if (isWhirringPlaying) { whirring.KillLoop(); isWhirringPlaying = false; } } //make sure music volume resetting can be remembered between blastoffs diff --git a/Assets/Scripts/Games/Manzai/Manzai.cs b/Assets/Scripts/Games/Manzai/Manzai.cs index c78df9a30..dd3f46b85 100644 --- a/Assets/Scripts/Games/Manzai/Manzai.cs +++ b/Assets/Scripts/Games/Manzai/Manzai.cs @@ -572,7 +572,7 @@ namespace HeavenStudio.Games if (crowdSound != null) { - crowdSound.Stop(); + crowdSound.KillLoop(); } } @@ -588,7 +588,7 @@ namespace HeavenStudio.Games { if (crowdSound != null) { - crowdSound.Stop(); + crowdSound.KillLoop(); } crowdSound = SoundByte.PlayOneShotGame("manzai/disappointed"); @@ -774,7 +774,7 @@ namespace HeavenStudio.Games if (crowdSound != null) { - crowdSound.Stop(); + crowdSound.KillLoop(); } } @@ -782,7 +782,7 @@ namespace HeavenStudio.Games { if (crowdSound != null) { - crowdSound.Stop(); + crowdSound.KillLoop(); } if (!missedWithWrongButton) diff --git a/Assets/Scripts/Games/SlotMonster/SlotMonster.cs b/Assets/Scripts/Games/SlotMonster/SlotMonster.cs index 313bbb98f..d5909ead5 100644 --- a/Assets/Scripts/Games/SlotMonster/SlotMonster.cs +++ b/Assets/Scripts/Games/SlotMonster/SlotMonster.cs @@ -219,7 +219,7 @@ namespace HeavenStudio.Games string hitSfx = "slotMonster/stop_" + (isLast && isHit && !isMiss ? "hit" : (currentButton + 1)); SoundByte.PlayOneShotGame(hitSfx, forcePlay: true); if (isLast) { - if (rollingSound != null) rollingSound.Stop(); + if (rollingSound != null) rollingSound.KillLoop(); inputsActive = false; if (isHit && !isMiss) { smAnim.DoScaledAnimationAsync("Win", 0.5f); @@ -235,7 +235,7 @@ namespace HeavenStudio.Games public void StartInterval(RiqEntity si, bool autoPass, int eyeSprite, double gameSwitchBeat) { - if (rollingSound != null) rollingSound.Stop(); + if (rollingSound != null) rollingSound.KillLoop(); List slotActions = gameEntities.FindAll(e => e.datamodel == "slotMonster/slot" && e.beat >= si.beat && e.beat < si.beat + si.length); if (slotActions.Count <= 0) return; @@ -322,7 +322,7 @@ namespace HeavenStudio.Games private void ButtonEndMiss(PlayerActionEvent caller) { Debug.Log("miss i guess"); - if (rollingSound != null) rollingSound.Stop(); + if (rollingSound != null) rollingSound.KillLoop(); inputsActive = false; smAnim.DoScaledAnimationAsync("Lose", 0.5f); foreach (var anim in eyeAnims) { diff --git a/Assets/Scripts/Util/MultiSound.cs b/Assets/Scripts/Util/MultiSound.cs index d79143dbf..2a3bc430f 100644 --- a/Assets/Scripts/Util/MultiSound.cs +++ b/Assets/Scripts/Util/MultiSound.cs @@ -111,7 +111,7 @@ namespace HeavenStudio.Util { foreach (Util.Sound sound in playingSounds) { - sound.Stop(); + sound.KillLoop(); } if (destroy) {