Xelnath написалThis is odd. If you add an animation and don't explicitly set it as looping... it doesn't loop.
Odd indeed. Since you told me you can't reproduce my error on your side I changed my controlling script to following :
#region In air animations
if (Input.GetKeyDown(KeyCode.Space) && player.onGround)
{
SetAnim("jump", false);
AddAnim("trans_jumpToFall", false);
}
else if (!player.nearLand && !player.onGround)
{
AddAnim("fall", true);
}
if (!player.onGround && player.nearLand)
{
AddAnim("trans_fallToIdle", false);
}
#endregion
And the result here I get is the fallToLand transition's queue working only when neither of the booleans(onGround & nearLand) are true. I speculate this due to another AddAnimation queued is overriding intended play order (i.e. idle animation is overriding its queue since both animations use those boolean checks atm).
So I was looking into more efficient way of triggering both animations in good separated checks, but struggling.
One thing I'm sure I need is way to store previous and current animation being checked so that I can signify my if statements. Any suggestions?