mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:37:37 +02:00
Bop Refactor + Tweaks/Fixes (#582)
* blue bear tweaks * OnBeatPulse callback added * Fixing humming bug in BM + Metronome fix + Some games conversion to onbeatpulse * clappy trio to drumming practice * rest of the games converted * two minor changes
This commit is contained in:
@ -208,13 +208,13 @@ namespace HeavenStudio.Games
|
||||
// print("current beat: " + conductor.songPositionInBeatsAsDouble);
|
||||
if (stopCatchLeft > 0 && stopCatchLeft <= cond.songPositionInBeatsAsDouble)
|
||||
{
|
||||
plalinAnim.Play("idle", 0, 0);
|
||||
plalinAnim.DoScaledAnimationAsync("idle", 0.5f);
|
||||
stopCatchLeft = 0;
|
||||
}
|
||||
|
||||
if (stopCatchRight > 0 && stopCatchRight <= cond.songPositionInBeatsAsDouble)
|
||||
{
|
||||
alalinAnim.Play("idle", 0, 0);
|
||||
alalinAnim.DoScaledAnimationAsync("idle", 0.5f);
|
||||
stopCatchRight = 0;
|
||||
}
|
||||
|
||||
@ -236,19 +236,6 @@ namespace HeavenStudio.Games
|
||||
heartMessage.SetActive(false);
|
||||
}
|
||||
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (bopLeft && stopCatchLeft == 0)
|
||||
{
|
||||
plalinAnim.Play("bop", 0, 0);
|
||||
}
|
||||
|
||||
if (bopRight && stopCatchRight == 0)
|
||||
{
|
||||
alalinAnim.Play("bop", 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInput.GetIsAction(InputAction_Left) && !IsExpectingInputNow(InputAction_Left.inputLockCategory))
|
||||
{
|
||||
catchWhiff(false);
|
||||
@ -260,6 +247,19 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (bopLeft && stopCatchLeft == 0)
|
||||
{
|
||||
plalinAnim.DoScaledAnimationAsync("bop", 0.5f);
|
||||
}
|
||||
|
||||
if (bopRight && stopCatchRight == 0)
|
||||
{
|
||||
alalinAnim.DoScaledAnimationAsync("bop", 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
public void DropFruit(double beat, int side, bool smile, bool isPineapple, float endSmile)
|
||||
{
|
||||
var objectToSpawn = isPineapple ? pineappleBase : orangeBase;
|
||||
@ -344,23 +344,23 @@ namespace HeavenStudio.Games
|
||||
case (int)WhoBops.Plalin:
|
||||
if (stopCatchLeft == 0)
|
||||
{
|
||||
plalinAnim.Play("bop", 0, 0);
|
||||
plalinAnim.DoScaledAnimationAsync("bop", 0.5f);
|
||||
}
|
||||
break;
|
||||
case (int)WhoBops.Alalin:
|
||||
if (stopCatchRight == 0)
|
||||
{
|
||||
alalinAnim.Play("bop", 0, 0);
|
||||
alalinAnim.DoScaledAnimationAsync("bop", 0.5f);
|
||||
}
|
||||
break;
|
||||
case (int)WhoBops.Both:
|
||||
if (stopCatchRight == 0)
|
||||
{
|
||||
alalinAnim.Play("bop", 0, 0);
|
||||
alalinAnim.DoScaledAnimationAsync("bop", 0.5f);
|
||||
}
|
||||
if (stopCatchLeft == 0)
|
||||
{
|
||||
plalinAnim.Play("bop", 0, 0);
|
||||
plalinAnim.DoScaledAnimationAsync("bop", 0.5f);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -374,12 +374,12 @@ namespace HeavenStudio.Games
|
||||
|
||||
if (side)
|
||||
{
|
||||
alalinAnim.Play(anim, 0, 0);
|
||||
alalinAnim.DoScaledAnimationAsync(anim, 0.5f);
|
||||
stopCatchRight = beat + 0.9f;
|
||||
}
|
||||
else
|
||||
{
|
||||
plalinAnim.Play(anim, 0, 0);
|
||||
plalinAnim.DoScaledAnimationAsync(anim, 0.5f);
|
||||
stopCatchLeft = beat + 0.9f;
|
||||
}
|
||||
|
||||
@ -402,12 +402,12 @@ namespace HeavenStudio.Games
|
||||
|
||||
if (side)
|
||||
{
|
||||
alalinAnim.Play("miss" + fruitType, 0, 0);
|
||||
alalinAnim.DoScaledAnimationAsync("miss" + fruitType, 0.5f);
|
||||
stopCatchRight = beat + 0.7f;
|
||||
}
|
||||
else
|
||||
{
|
||||
plalinAnim.Play("miss" + fruitType, 0, 0);
|
||||
plalinAnim.DoScaledAnimationAsync("miss" + fruitType, 0.5f);
|
||||
stopCatchLeft = beat + 0.7f;
|
||||
}
|
||||
}
|
||||
@ -438,12 +438,12 @@ namespace HeavenStudio.Games
|
||||
|
||||
if (side)
|
||||
{
|
||||
alalinAnim.Play("whiff", 0, 0);
|
||||
alalinAnim.DoScaledAnimationAsync("whiff", 0.5f);
|
||||
stopCatchRight = beat + 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
plalinAnim.Play("whiff", 0, 0);
|
||||
plalinAnim.DoScaledAnimationAsync("whiff", 0.5f);
|
||||
stopCatchLeft = beat + 0.5f;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user