Auto Bop Internal Rework + Bug Fixes (#589)

* fixed blue bear

* fixed tap trial bug

* see saw fix

* Auto bop rework
This commit is contained in:
Rapandrasmus
2023-12-05 23:38:52 +01:00
committed by GitHub
parent 4f07d47bdb
commit 3eac52f38d
29 changed files with 353 additions and 268 deletions

View File

@ -110,9 +110,7 @@ namespace HeavenStudio.Games
[SerializeField] private float monkeyJumpHeight = 3f;
[SerializeField] private float maxFlashOpacity = 0.8f;
private GameEvent bop = new();
private bool canBop = true;
private bool shouldBop = true;
private double jumpStartBeat = double.MinValue;
@ -121,11 +119,12 @@ namespace HeavenStudio.Games
private void Awake()
{
instance = this;
SetupBopRegion("tapTrial", "bop", "toggle2");
}
public override void OnBeatPulse(double beat)
{
if (shouldBop) SingleBop();
if (BeatIsInBopRegion(beat)) SingleBop();
}
private void Update()
@ -253,7 +252,6 @@ namespace HeavenStudio.Games
public void Bop(double beat, float length, bool bop, bool autoBop)
{
shouldBop = autoBop;
if (bop)
{
List<BeatAction.Action> actions = new();
@ -443,14 +441,14 @@ namespace HeavenStudio.Games
private void MissJump(PlayerActionEvent caller)
{
player.JumpTapMiss(false);
if (giraffe.IsAnimationNotPlaying()) giraffe.DoScaledAnimationAsync("Miss", 0.5f);
if (giraffe.IsAnimationNotPlaying() && currentAnim != GiraffeAnimation.Exit) giraffe.DoScaledAnimationAsync("Miss", 0.5f);
ResetScroll();
}
private void MissJumpFinal(PlayerActionEvent caller)
{
player.JumpTapMiss(true);
if (giraffe.IsAnimationNotPlaying()) giraffe.DoScaledAnimationAsync("Miss", 0.5f);
if (giraffe.IsAnimationNotPlaying() && currentAnim != GiraffeAnimation.Exit) giraffe.DoScaledAnimationAsync("Miss", 0.5f);
ResetScroll();
}