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

@ -94,10 +94,8 @@ namespace HeavenStudio.Games
[Header("Variables")]
bool intervalStarted;
double intervalStartBeat;
bool bossBop = true;
public double beatInterval = 4f;
public bool bossAnnoyed = false;
private double lastReportedBeat = 0f;
const string sfxName = "meatGrinder/";
public static MeatGrinder instance;
@ -124,6 +122,7 @@ namespace HeavenStudio.Games
private void Awake()
{
instance = this;
SetupBopRegion("meatGrinder", "bop", "bossBop");
}
void OnDestroy()
@ -161,7 +160,7 @@ namespace HeavenStudio.Games
{
if (!BossAnim.IsPlayingAnimationName("BossCall")
&& !BossAnim.IsPlayingAnimationName("BossSignal")
&& bossBop)
&& BeatIsInBopRegion(beat))
{
BossAnim.DoScaledAnimationAsync(bossAnnoyed ? "BossMiss" : "Bop", 0.5f);
}
@ -169,7 +168,6 @@ namespace HeavenStudio.Games
public void Bop(double beat, double length, bool doesBop, bool autoBop)
{
bossBop = autoBop;
if (doesBop)
{
for (int i = 0; i < length; i++)