Stuff just for r2

This commit is contained in:
Epicgamer2469 2024-04-07 12:06:48 -05:00
parent d5b31da9fd
commit fe967b8250
5 changed files with 40 additions and 17 deletions

View file

@ -48,11 +48,11 @@ namespace HeavenStudio.Games.Loaders
new((x, _) => (int)x == 1, new string[] { "variationPa"}), new((x, _) => (int)x == 1, new string[] { "variationPa"}),
new((x, _) => (int)x == 2, new string[] { "variationPa_n"}), 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("variationPan", new EntityTypes.NoteSampleDropdown(BonOdori.variationPan.PanC, BonOdori.GetSample, "semitone"), "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", new EntityTypes.NoteSampleDropdown(BonOdori.variationPa.PaG, BonOdori.GetSample, "semitone"), "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("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("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 == 1, new string[] { "variationDo"}),
new((x, _) => (int)x == 2, new string[] { "variationDo_n"}), 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("variationDon", new EntityTypes.NoteSampleDropdown(BonOdori.variationDon.DonA, BonOdori.GetSample, "semitone"), "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", new EntityTypes.NoteSampleDropdown(BonOdori.variationDo.DoC, BonOdori.GetSample, "semitone"), "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("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.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."),
}, },
}, },
@ -251,6 +251,29 @@ namespace HeavenStudio.Games
DoG = 1 DoG = 1
} }
public static readonly Dictionary<object, NoteSample> 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 static BonOdori instance { get; set; }
public void Awake() public void Awake()

View file

@ -848,7 +848,7 @@ namespace HeavenStudio.Games
Conductor.instance.FadeMinigameVolume(0, 0, 1); Conductor.instance.FadeMinigameVolume(0, 0, 1);
drumTempVolume = 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 //make sure music volume resetting can be remembered between blastoffs

View file

@ -572,7 +572,7 @@ namespace HeavenStudio.Games
if (crowdSound != null) if (crowdSound != null)
{ {
crowdSound.Stop(); crowdSound.KillLoop();
} }
} }
@ -588,7 +588,7 @@ namespace HeavenStudio.Games
{ {
if (crowdSound != null) if (crowdSound != null)
{ {
crowdSound.Stop(); crowdSound.KillLoop();
} }
crowdSound = SoundByte.PlayOneShotGame("manzai/disappointed"); crowdSound = SoundByte.PlayOneShotGame("manzai/disappointed");
@ -774,7 +774,7 @@ namespace HeavenStudio.Games
if (crowdSound != null) if (crowdSound != null)
{ {
crowdSound.Stop(); crowdSound.KillLoop();
} }
} }
@ -782,7 +782,7 @@ namespace HeavenStudio.Games
{ {
if (crowdSound != null) if (crowdSound != null)
{ {
crowdSound.Stop(); crowdSound.KillLoop();
} }
if (!missedWithWrongButton) if (!missedWithWrongButton)

View file

@ -219,7 +219,7 @@ namespace HeavenStudio.Games
string hitSfx = "slotMonster/stop_" + (isLast && isHit && !isMiss ? "hit" : (currentButton + 1)); string hitSfx = "slotMonster/stop_" + (isLast && isHit && !isMiss ? "hit" : (currentButton + 1));
SoundByte.PlayOneShotGame(hitSfx, forcePlay: true); SoundByte.PlayOneShotGame(hitSfx, forcePlay: true);
if (isLast) { if (isLast) {
if (rollingSound != null) rollingSound.Stop(); if (rollingSound != null) rollingSound.KillLoop();
inputsActive = false; inputsActive = false;
if (isHit && !isMiss) { if (isHit && !isMiss) {
smAnim.DoScaledAnimationAsync("Win", 0.5f); smAnim.DoScaledAnimationAsync("Win", 0.5f);
@ -235,7 +235,7 @@ namespace HeavenStudio.Games
public void StartInterval(RiqEntity si, bool autoPass, int eyeSprite, double gameSwitchBeat) public void StartInterval(RiqEntity si, bool autoPass, int eyeSprite, double gameSwitchBeat)
{ {
if (rollingSound != null) rollingSound.Stop(); if (rollingSound != null) rollingSound.KillLoop();
List<RiqEntity> slotActions = gameEntities.FindAll(e => e.datamodel == "slotMonster/slot" && e.beat >= si.beat && e.beat < si.beat + si.length); List<RiqEntity> slotActions = gameEntities.FindAll(e => e.datamodel == "slotMonster/slot" && e.beat >= si.beat && e.beat < si.beat + si.length);
if (slotActions.Count <= 0) return; if (slotActions.Count <= 0) return;
@ -322,7 +322,7 @@ namespace HeavenStudio.Games
private void ButtonEndMiss(PlayerActionEvent caller) private void ButtonEndMiss(PlayerActionEvent caller)
{ {
Debug.Log("miss i guess"); Debug.Log("miss i guess");
if (rollingSound != null) rollingSound.Stop(); if (rollingSound != null) rollingSound.KillLoop();
inputsActive = false; inputsActive = false;
smAnim.DoScaledAnimationAsync("Lose", 0.5f); smAnim.DoScaledAnimationAsync("Lose", 0.5f);
foreach (var anim in eyeAnims) { foreach (var anim in eyeAnims) {

View file

@ -111,7 +111,7 @@ namespace HeavenStudio.Util
{ {
foreach (Util.Sound sound in playingSounds) foreach (Util.Sound sound in playingSounds)
{ {
sound.Stop(); sound.KillLoop();
} }
if (destroy) if (destroy)
{ {