Mr Upbeat and Lockstep Animation fixes (#238)

* mr upbeat input fix + lockstep offbeat switch event seperation

* Lockstep + MrUpbeat animation fixes
This commit is contained in:
Rapandrasmus
2023-01-25 16:29:09 +01:00
committed by GitHub
parent 669588ab68
commit 3e76bd21b2
3 changed files with 26 additions and 10 deletions

View File

@ -58,6 +58,7 @@ namespace HeavenStudio.Games
public float beat;
public bool goRight;
}
bool startLeft;
public static MrUpbeat instance;
@ -101,6 +102,14 @@ namespace HeavenStudio.Games
});
}
}
if (queuedInputs.Count % 2 != 0)
{
startLeft = true;
}
else
{
startLeft = false;
}
queuedInputs.Clear();
}
if (PlayerInput.Pressed() && !IsExpectingInputNow(InputType.STANDARD_DOWN))
@ -132,7 +141,7 @@ namespace HeavenStudio.Games
if (GameManager.instance.currentGame == "mrUpbeat")
{
float offSet = 0;
if (!MrUpbeat.instance.isPlaying(MrUpbeat.instance.metronomeAnim, "MetronomeIdle") && !MrUpbeat.instance.isPlaying(MrUpbeat.instance.metronomeAnim, "MetronomeGoRight"))
if (MrUpbeat.instance.startLeft)
{
offSet = 1;
}
@ -157,6 +166,14 @@ namespace HeavenStudio.Games
}
}
if ((length + 1) % 2 != 0)
{
MrUpbeat.instance.startLeft = true;
}
else
{
MrUpbeat.instance.startLeft = false;
}
}
else
{