Bug Fixes + Small Additions (#412)

* lotta stuffs

* dj school bug fixed
* dog ninja overhauled AGAIN. you can start a cue outside of the game now (something i planned months ago lol)
* also two objects will not overlap when they're the same but when they're not the same they will overlap
* commiting cause im gonna try half-recoding meat grinder
* also im trying to fix mrupbeat's beeping cuz oh my god how is this not fixed yet

* meat grinder finished + tap trial bug fixed + mute dog ninja

MUTE DOG NINJA ONLY WHEN INACTIVE ‼️

* last minute stuff + mr upbeat

i will be reworking mr upbeat in another branch but i wanna not bloat this pr any further so bleehhhh :P

* dj school final bug fix
This commit is contained in:
AstrlJelly
2023-05-07 00:45:44 -04:00
committed by GitHub
parent 8b63cce876
commit 36afef6f9e
13 changed files with 491 additions and 469 deletions

View File

@ -19,13 +19,14 @@ namespace HeavenStudio.Games.Loaders
{
preFunction = delegate {var e = eventCaller.currentEntity; MrUpbeat.Stepping(e.beat, e.length); },
defaultLength = 4f,
resizable = true
resizable = true,
},
new GameAction("blipping", "Beeping")
{
function = delegate {var e = eventCaller.currentEntity; MrUpbeat.instance.Blipping(e.beat, e.length); },
function = delegate {var e = eventCaller.currentEntity; MrUpbeat.Blipping(e.beat, e.length); },
defaultLength = 4f,
resizable = true
resizable = true,
inactiveFunction = delegate {var e = eventCaller.currentEntity; MrUpbeat.Blipping(e.beat, e.length); },
},
new GameAction("ding!", "Ding!")
{
@ -47,17 +48,19 @@ namespace HeavenStudio.Games
public class MrUpbeat : Minigame
{
[Header("References")]
public Animator metronomeAnim;
public UpbeatMan man;
[Header("Properties")]
static List<float> queuedBeeps = new List<float>();
static List<queuedUpbeatInputs> queuedInputs = new List<queuedUpbeatInputs>();
public struct queuedUpbeatInputs
{
public float beat;
public bool goRight;
}
[Header("References")]
public Animator metronomeAnim;
public UpbeatMan man;
[Header("Properties")]
bool startLeft;
public static MrUpbeat instance;
@ -72,6 +75,7 @@ namespace HeavenStudio.Games
if (!Conductor.instance.isPlaying || Conductor.instance.isPaused)
{
if (queuedInputs.Count > 0) queuedInputs.Clear();
if (queuedBeeps.Count > 0) queuedBeeps.Clear();
}
}
@ -117,6 +121,16 @@ namespace HeavenStudio.Games
man.Step();
}
}
if (queuedBeeps.Count > 0) {
var beepAnims = new List<BeatAction.Action>();
foreach (var item in queuedBeeps)
{
beepAnims.Add(new BeatAction.Action(item, delegate { man.blipAnimator.Play("Blip", 0, 0); }));
}
BeatAction.New(instance.gameObject, beepAnims);
queuedBeeps.Clear();
}
}
public void Ding(bool applause)
@ -125,15 +139,17 @@ namespace HeavenStudio.Games
if (applause) Jukebox.PlayOneShot("applause");
}
public void Blipping(float beat, float length)
public static void Blipping(float beat, float length)
{
List<MultiSound.Sound> beeps = new List<MultiSound.Sound>();
for (int i = 0; i < length + 1; i++)
{
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + i, delegate { man.Blip(); }),
});
beeps.Add(new MultiSound.Sound("mrUpbeat/blip", beat + i));
queuedBeeps.Add(beat + i);
}
MultiSound.Play(beeps.ToArray(), forcePlay: true);
}
public static void Stepping(float beat, float length)