Fixed working dough and lockstep earrape bugs and tambourine interval bugs (#281)

* mr upbeat input fix + lockstep offbeat switch event seperation

* Lockstep + MrUpbeat animation fixes

* Fixes to lockstep, tambourine and wd
This commit is contained in:
Rapandrasmus 2023-02-15 22:40:20 +01:00 committed by GitHub
parent e213a7f900
commit 52c9474c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 11 deletions

View File

@ -127,10 +127,7 @@ namespace HeavenStudio.Games
void OnDestroy()
{
if (!Conductor.instance.isPlaying || Conductor.instance.isPaused)
{
if (queuedInputs.Count > 0) queuedInputs.Clear();
}
if (queuedInputs.Count > 0) queuedInputs.Clear();
}
public void Update()
@ -236,7 +233,7 @@ namespace HeavenStudio.Games
{
if (GameManager.instance.currentGame == "lockstep")
{
for (int i = 0; i < length + 1; i++)
for (int i = 0; i < length; i++)
{
Lockstep.instance.ScheduleInput(beat - 1, 1 + i, InputType.STANDARD_DOWN, Lockstep.instance.Just, Lockstep.instance.Miss, Lockstep.instance.Nothing);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
@ -247,7 +244,7 @@ namespace HeavenStudio.Games
}
else
{
for (int i = 0; i < length + 1; i++)
for (int i = 0; i < length; i++)
{
queuedInputs.Add(beat + i);
}

View File

@ -190,13 +190,9 @@ namespace HeavenStudio.Games
{
DesummonFrog();
sadFace.SetActive(false);
queuedInputs.Clear();
//queuedInputs.Clear();
misses = 0;
intervalStarted = true;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + interval, delegate { intervalStarted = false; }),
});
}
}
@ -229,6 +225,7 @@ namespace HeavenStudio.Games
monkeyAnimator.Play("MonkeyPassTurn", 0, 0);
Jukebox.PlayOneShotGame($"tambourine/monkey/turnPass/{UnityEngine.Random.Range(1, 6)}");
happyFace.SetActive(true);
intervalStarted = false;
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + 0.3f, delegate { happyFace.SetActive(false); })
@ -248,6 +245,7 @@ namespace HeavenStudio.Games
new BeatAction.Action(beat + length + input.beatAwayFromStart, delegate { Bop(beat + length + input.beatAwayFromStart, (int)WhoBops.Monkey); })
});
}
queuedInputs.Clear();
}
public void Bop(float beat, int whoBops)

View File

@ -630,6 +630,7 @@ namespace HeavenStudio.Games
void JustSmall(PlayerActionEvent caller, float state)
{
if (GameManager.instance.currentGame != "workingDough") return;
float beat = caller.startBeat + caller.timer;
if (currentBalls.Count > 0)
{
@ -655,6 +656,7 @@ namespace HeavenStudio.Games
void JustBig(PlayerActionEvent caller, float state)
{
if (GameManager.instance.currentGame != "workingDough") return;
float beat = caller.startBeat + caller.timer;
if (currentBalls.Count > 0)
{