bg cats work better
This commit is contained in:
parent
f788bd5e59
commit
666a5d68c5
|
|
@ -36,19 +36,17 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
|||
_anim.DoNormalizedAnimation("CatDance", normalized);
|
||||
}
|
||||
|
||||
public void Activate(double beat, double length, bool inToScene, bool moveInstant, bool dance, bool instant)
|
||||
public void Activate(double beat, double length, bool inToScene, bool moveInstant, bool dance, bool instantStart, bool instantEnd)
|
||||
{
|
||||
_moveScript.Move(beat, moveInstant ? 0 : length, inToScene);
|
||||
|
||||
double overflowBeat = beat % 2;
|
||||
double toBeat = 2.0 - overflowBeat;
|
||||
|
||||
_danceBeat = beat + (instant ? -overflowBeat : toBeat) - 0.5;
|
||||
|
||||
_danceBeat = beat + (instantStart ? -overflowBeat : toBeat) - 0.5;
|
||||
if (!inToScene) _danceBeat = double.MaxValue;
|
||||
|
||||
_stopDanceBeat = beat + (instant ? -overflowBeat : toBeat) - 0.5;
|
||||
|
||||
_stopDanceBeat = beat + (instantEnd ? -overflowBeat : toBeat) - 0.5;
|
||||
if (dance) _stopDanceBeat = double.MaxValue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -981,20 +981,21 @@ namespace HeavenStudio.Games
|
|||
bgCats = Math.Clamp(bgCats, 0, 12);
|
||||
bgCats -= 1;
|
||||
beforeBgCats -= 1;
|
||||
Debug.Log(bgCats - beforeBgCats);
|
||||
|
||||
for (int i = 0; i < _bgCats.Length; i++)
|
||||
{
|
||||
if (bgCats < beforeBgCats)
|
||||
{
|
||||
_bgCats[i].Activate(beat, length, bgCats >= i, instant || !(i > bgCats && i <= beforeBgCats), dance, instant || i <= bgCats);
|
||||
_bgCats[i].Activate(beat, length, bgCats >= i, instant || !(i > bgCats && i <= beforeBgCats), dance, instant || i <= bgCats, instant);
|
||||
}
|
||||
else if (bgCats > beforeBgCats)
|
||||
{
|
||||
_bgCats[i].Activate(beat, length, bgCats >= i, instant || !(i > beforeBgCats && i <= bgCats), dance, instant || i <= beforeBgCats);
|
||||
_bgCats[i].Activate(beat, length, bgCats >= i, instant || !(i > beforeBgCats && i <= bgCats), dance, instant || i <= beforeBgCats, instant);
|
||||
}
|
||||
else
|
||||
{
|
||||
_bgCats[i].Activate(beat, length, bgCats >= i, true, dance, instant);
|
||||
_bgCats[i].Activate(beat, length, bgCats >= i, true, dance, true, instant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue