mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 15:27:38 +02:00
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:
@ -113,14 +113,12 @@ namespace HeavenStudio.Games
|
||||
[SerializeField] private Student student;
|
||||
[SerializeField] private GameObject djYellow;
|
||||
private Animator djYellowAnim;
|
||||
private double lastReportedBeat = 0f;
|
||||
public DJYellow djYellowScript;
|
||||
|
||||
[Header("Properties")]
|
||||
public GameEvent bop = new GameEvent();
|
||||
public bool djYellowHolding;
|
||||
public bool andStop;
|
||||
public bool goBop;
|
||||
public double beatOfInstance;
|
||||
private bool djYellowBopLeft;
|
||||
public bool shouldBeHolding = false;
|
||||
@ -138,7 +136,7 @@ namespace HeavenStudio.Games
|
||||
djYellowAnim = djYellow.GetComponent<Animator>();
|
||||
djYellowScript = djYellow.GetComponent<DJYellow>();
|
||||
student.Init();
|
||||
goBop = true;
|
||||
SetupBopRegion("djSchool", "bop", "toggle");
|
||||
}
|
||||
|
||||
//For inactive game purposes
|
||||
@ -167,7 +165,7 @@ namespace HeavenStudio.Games
|
||||
|
||||
public override void OnBeatPulse(double beat)
|
||||
{
|
||||
if (!goBop) return;
|
||||
if (!BeatIsInBopRegion(beat)) return;
|
||||
if (student.isHolding)
|
||||
{
|
||||
student.anim.DoScaledAnimationAsync("HoldBop", 0.5f);
|
||||
@ -243,7 +241,6 @@ namespace HeavenStudio.Games
|
||||
|
||||
public void Bop(double beat, float length, bool isBopping, bool autoBop)
|
||||
{
|
||||
goBop = autoBop;
|
||||
if (isBopping)
|
||||
{
|
||||
for (int i = 0; i < length; i++)
|
||||
|
@ -258,7 +258,7 @@ namespace HeavenStudio.Games.Scripts_DJSchool
|
||||
{
|
||||
new BeatAction.Action(caller.timer + caller.startBeat + 1, delegate
|
||||
{
|
||||
if (game.goBop)
|
||||
if (game.BeatIsInBopRegion(caller.timer + caller.startBeat + 1))
|
||||
{
|
||||
game.djYellowScript.ChangeHeadSprite(DJYellow.DJExpression.CrossEyed);
|
||||
if (game.djYellowHolding) game.djYellowScript.Reverse();
|
||||
@ -278,7 +278,7 @@ namespace HeavenStudio.Games.Scripts_DJSchool
|
||||
{
|
||||
new BeatAction.Action(beat, delegate
|
||||
{
|
||||
if (game.goBop)
|
||||
if (game.BeatIsInBopRegion(beat))
|
||||
{
|
||||
game.djYellowScript.ChangeHeadSprite(DJYellow.DJExpression.CrossEyed);
|
||||
if (game.djYellowHolding) game.djYellowScript.Reverse();
|
||||
|
Reference in New Issue
Block a user