You can no longer stab multiple peas at once (Fork Lifter)

This commit is contained in:
Braedon
2022-02-05 23:03:31 -05:00
parent 2af84478ed
commit f376e30ee2
31 changed files with 2791 additions and 363 deletions

View File

@ -34,6 +34,8 @@ namespace RhythmHeavenMania.Games.ForkLifter
private bool isEating = false;
public int hitOnFrame;
// Burger shit
public bool topbun, middleburger, bottombun;
@ -50,13 +52,16 @@ namespace RhythmHeavenMania.Games.ForkLifter
anim = GetComponent<Animator>();
}
private void Update()
private void LateUpdate()
{
if (PlayerInput.Pressed())
{
hitOnFrame = 0;
Stab(null);
}
print(hitOnFrame);
if (ForkLifter.instance.EligibleHits.Count == 0)
{
currentHitInList = 0;
@ -118,7 +123,7 @@ namespace RhythmHeavenMania.Games.ForkLifter
public void Stab(Pea p)
{
if (isEating) return;
if (isEating || hitOnFrame > 0) return;
if (p == null)
{

View File

@ -180,7 +180,7 @@ namespace RhythmHeavenMania.Games.ForkLifter
StateCheck(normalizedBeat);
if (PlayerInput.Pressed())
if (PlayerInput.Pressed() && ForkLifterPlayer.instance.hitOnFrame == 0)
{
if (state.perfect)
{
@ -194,6 +194,8 @@ namespace RhythmHeavenMania.Games.ForkLifter
{
Late();
}
ForkLifterPlayer.instance.hitOnFrame++;
}
if (normalizedBeat > 1.35f)