mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:57:37 +02:00
* add Jukebox library todo: - saving / loading of new format - inferrence of unknown data like past versions - move the temporary float casts to proper use of double - make sound related functions take double for timing - inform people that the Jukebox sound player was renamed to SoundByte lol * make sound, input scheduling, and super curve use double precision * successfully load charts * editor works again v1 riqs can be saved and loaded * first tempo and volume markers are unmovable fix loading of charts' easing values * use gsync / freesync * update Jukebox refs to SoundByte * game events use double part 1 Air Rally - Glee Club converted * don't load song if chart load fails * finish conversion of all minigames * remove editor waveform toggle * timeline now respects added song offset length clear cache files on app close prepped notes for dsp sync * update timeline length when offset changed * update to latest Jukebox * make error panel object in global game manager * improve conductor music scheduling * added error message box fix first game events sometimes not playing
This commit is contained in:
@ -74,11 +74,11 @@ namespace HeavenStudio.Games
|
||||
using Scripts_MeatGrinder;
|
||||
public class MeatGrinder : Minigame
|
||||
{
|
||||
static List<float> queuedInputs = new List<float>();
|
||||
static List<double> queuedInputs = new();
|
||||
static List<QueuedInterval> queuedIntervals = new List<QueuedInterval>();
|
||||
struct QueuedInterval
|
||||
{
|
||||
public float beat;
|
||||
public double beat;
|
||||
public float length;
|
||||
}
|
||||
|
||||
@ -91,11 +91,11 @@ namespace HeavenStudio.Games
|
||||
|
||||
[Header("Variables")]
|
||||
bool intervalStarted;
|
||||
float intervalStartBeat;
|
||||
double intervalStartBeat;
|
||||
bool bossBop = true;
|
||||
public float beatInterval = 4f;
|
||||
public bool bossAnnoyed = false;
|
||||
private float lastReportedBeat = 0f;
|
||||
private double lastReportedBeat = 0f;
|
||||
const string sfxName = "meatGrinder/";
|
||||
|
||||
public static MeatGrinder instance;
|
||||
@ -130,7 +130,7 @@ namespace HeavenStudio.Games
|
||||
if (PlayerInput.Pressed(true) && (!IsExpectingInputNow(InputType.STANDARD_DOWN) || !IsExpectingInputNow(InputType.DIRECTION_DOWN))) {
|
||||
TackAnim.DoScaledAnimationAsync("TackEmptyHit", 0.5f);
|
||||
TackAnim.SetBool("tackMeated", false);
|
||||
Jukebox.PlayOneShotGame(sfxName+"whiff");
|
||||
SoundByte.PlayOneShotGame(sfxName+"whiff");
|
||||
if (bossAnnoyed) BossAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
}
|
||||
|
||||
public void Bop(float beat, float length, bool doesBop, bool autoBop)
|
||||
public void Bop(double beat, float length, bool doesBop, bool autoBop)
|
||||
{
|
||||
bossBop = autoBop;
|
||||
if (doesBop) {
|
||||
@ -169,7 +169,7 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
}
|
||||
|
||||
public static void PreInterval(float beat, float length)
|
||||
public static void PreInterval(double beat, float length)
|
||||
{
|
||||
if (MeatGrinder.instance.intervalStarted || MeatGrinder.queuedIntervals.Count > 0) return;
|
||||
|
||||
@ -191,7 +191,7 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
}
|
||||
|
||||
public void StartInterval(float beat, float length)
|
||||
public void StartInterval(double beat, float length)
|
||||
{
|
||||
if (MeatGrinder.instance.intervalStarted) return;
|
||||
|
||||
@ -204,9 +204,9 @@ namespace HeavenStudio.Games
|
||||
});
|
||||
}
|
||||
|
||||
public void MeatToss(float beat)
|
||||
public void MeatToss(double beat)
|
||||
{
|
||||
Jukebox.PlayOneShotGame(sfxName+"toss");
|
||||
SoundByte.PlayOneShotGame(sfxName+"toss");
|
||||
|
||||
MeatToss Meat = Instantiate(MeatBase, gameObject.transform).GetComponent<MeatToss>();
|
||||
Meat.startBeat = beat;
|
||||
@ -215,17 +215,17 @@ namespace HeavenStudio.Games
|
||||
Meat.meatType = "DarkMeat";
|
||||
}
|
||||
|
||||
public void MeatCall(float beat)
|
||||
public void MeatCall(double beat)
|
||||
{
|
||||
BossAnim.DoScaledAnimationAsync("BossCall", 0.5f);
|
||||
Jukebox.PlayOneShotGame(sfxName+"signal");
|
||||
SoundByte.PlayOneShotGame(sfxName+"signal");
|
||||
|
||||
StartInterval(beat, beatInterval);
|
||||
|
||||
queuedInputs.Add(beat - intervalStartBeat);
|
||||
}
|
||||
|
||||
public void PassTurn(float beat)
|
||||
public void PassTurn(double beat)
|
||||
{
|
||||
intervalStarted = false;
|
||||
foreach (var input in queuedInputs)
|
||||
|
Reference in New Issue
Block a user