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

@ -140,9 +140,7 @@ namespace HeavenStudio.Games
[SerializeField] Sprite[] ObjectTypes;
private double lastReportedBeat = 0f;
private bool birdOnScreen = false;
bool dontBop = false;
private const string sfxNum = "dogNinja/";
public static DogNinja instance;
@ -200,6 +198,7 @@ namespace HeavenStudio.Games
private void Awake()
{
instance = this;
SetupBopRegion("dogNinja", "Bop", "auto");
}
void OnDestroy()
@ -216,7 +215,7 @@ namespace HeavenStudio.Games
public override void OnBeatPulse(double beat)
{
if (dontBop) return;
if (!BeatIsInBopRegion(beat)) return;
DogAnim.DoScaledAnimationAsync("Bop", 0.5f);
}
@ -267,7 +266,6 @@ namespace HeavenStudio.Games
public void Bop(double beat, float length, bool auto, bool bop)
{
dontBop = !auto;
if (!bop) return;
List<BeatAction.Action> actions = new();