fixed phonebop

oops i was playing the idle animation in update...
This commit is contained in:
AstrlJelly 2023-12-30 15:44:11 -05:00
parent 70badc64c1
commit 25aebccb35
2 changed files with 9 additions and 3 deletions

View file

@ -16,7 +16,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &7113627674537123824
Transform:
m_ObjectHideFlags: 0

View file

@ -266,7 +266,6 @@ namespace HeavenStudio.Games
if (cartEase.length != 0)
{
if (cartPhone) CartGuyAnim.Play("Phone", 0, 0);
float normalizedBeat = cond.GetPositionFromBeat(cartEase.beat, cartEase.length);
Util.EasingFunction.Function func = Util.EasingFunction.GetEasingFunction(cartEase.ease);
float newPos = func(0f, 1f, normalizedBeat);
@ -301,7 +300,11 @@ namespace HeavenStudio.Games
if (CartGuyParentAnim.gameObject.activeSelf) {
Debug.Log(cartPhone ? "PhoneBop" : "Bop");
CartGuyAnim.DoScaledAnimationAsync(cartPhone ? "PhoneBop" : "Bop", 0.5f);
if (cartPhone) {
CartGuyAnim.DoScaledAnimationAsync("PhoneBop", 0.5f);
} else {
CartGuyAnim.DoScaledAnimationAsync("Bop", 0.5f);
}
}
}
@ -381,6 +384,9 @@ namespace HeavenStudio.Games
};
cartPhone = spider;
cartDir = direction == 0 ? "Right" : "Left";
if (cartPhone) {
CartGuyAnim.Play("Phone", 0, 0);
}
}
public void ChangeGears(double beat, float length, int ease, float speed)